Problem:
Need to understand basic S3 operations by practice.
Solution Summary:
We will create an S3 bucket, create folders, add files and access files.
Prerequisites:
This lab assumes that you have setup AWS account as explained in the previous labs.
Solution Steps:
-
Login to AWS Console
-
Got to S3 Dashboard
-
Click on Create Bucket
-
Enter a Bucket name and region, and click next. Bucket name should be unique across all bucket names in Amazon S3.
-
Leave Versioning, Logging, Tags disabled. Click next.
-
Leave Manage users and Manage public permissions, as is and click next.
-
Review all details and click on ‘Create Bucket’.
-
Bucket will appear.
-
Click on Bucket, go to properties tab and explore properties and settings: Versioning, Logging, Static website hosting, Tags, Cross-region replication, Transfer acceleration, Events.
-
Note: To use cross-region replication, you must enable versioning on this bucket and on the target bucket.
-
-
Now go to the Objects tab and upload any file. I will be uploading Buddytutor logo.
-
Continue to click next, keeping options as is, but making a note of all options.
-
Finally review and upload.
-
Click on the image and explore all tabs: Overview, Properties, and Permissions. Overview will have: Open, Download, Download as and Make public. Properties will have Storage class, Encryption, Metadata, and Tags. Permissions are used to change read and/or write permissions for the file.
-
Try to access it by clicking on the link provided (e.g. https://s3.ap-south-1.amazonaws.com/buddytutor/BT_Logo_213.png as I have selected Mumbai region). You will receive and error XML. This is because, by default, the object is private.
-
Go to the permissions tab of the object (by clicking on the file) and give read permission for Everyone. Now if you try to access the link again, you should see the image (or any file you had entered).
-
Try creating a folder inside the bucket.
-
Upload a file to this folder. Make it public by clicking on the ‘Make Public’ option in the overview page of the image.
-
Go to the bucket home page, select all files (and folders) and delete it using delete option under the More dropdown.
Important Notes (Exam Tips)
-
Folders are not actually created within a bucket. They are just symbolic and the whole name (along with path) is the actual key to the file. E.g. myfolder1/myfolder2/nyfile.txt.
Comments
Good prctical explanation
Good prctical explanation with step by step