Monday, March 14, 2022

ASSIGNMENT: Create S3 Bucket and Versioning


Simple Storage Service (s3) Bucket

Step 1: Create a Bucket
  1. Search for S3 service OR Storage---> S3
    https://s3.console.aws.amazon.com/s3/home?region=ap-southeast-2#
  2. Click Create Bucket Button
  3. Provide details about bucket information
  4. Bucket name : mybucket908
  5. Aws Region :- ap-south-1
  6. ACL Disabled
  7. Block all public access: unchecked it
  8. Click on Create Bucket button.
Step 2: Add some files into S3 bucket
  1. Select bucket mybucket908
  2. Click on the upload button
  3. Add files/Add Folders Upload some files from your system.
  4. I am adding the file say index.html

Step 3: Download the file
  1. select index.html and click on Download/open
  2. You should be able to download

Step 4: Make index.html public
  1. Select Object URL and try to access it on the browser
  2. You will get the Access denied error
  3. Change the permission by Clicking on the Permission tab
  4. ACL enabled option and Acknowledge it.
  5. select index.html file
  6. Object Actions --> Make public using ACL and click on Make public button.

Step 5: Delete the Bucket
  1. You can only delete the bucket if there is no object in the bucket.

Enable versioning for S3 Objects

For example, if you make some changes in the index.html on your system and upload it again on the s3 bucket, then you will lose your previous version of the application. So we need to Enable versioning on Bucket level.

    Step 1: Select the Bucket and select Properties.
    Step 2:  Click on Bucket Versioning Edit button
    Step 3: Enable Bucket Version
    Step 4: Save Changes.
    Step 5: Make change in index.html file and Upload it to mybucket908.
    Step 6: Select index.html file and click on Version Tab.
    Step 7: You can see multiple versions of your application(index.html)

Experiments
  • Access the current version by using Object URL if it gives access denied error then make it public and access it.
  • Check are you able to switch between Current version and older version of index.html

Recover a deleted file

You can can't recover a file until the versioning is enabled on bucket level. Delete marker with unique ID shows the files which got deleted.

    1. Select index.html file
    2. Click on Delete button and Delete object
    3. Click on Show Versions, it will show the index.html file with its versions.

No comments:

Post a Comment

Fluentd

Open-source log data collector > why logs? - for compliance (auditing, company, business) - for security (transparency, monitoring, admin...