JTCyberTech / Cybersecurity-Home-Labs

5 stars 1 forks source link

1. AWS S3 Basic Lab Task 1 and 2 #82

Open JTCyberTech opened 1 year ago

JTCyberTech commented 1 year ago

AWS S3 Basics Project

Task 1: Creating my first AWS S3 Bucket

Key Takeaways



- Navigate to the S3 service. - On the search bar, search "S3" and click on it.



- On the Amazon S3 dashboard, click on "Create bucket".



- On the Create bucket page: - For Bucket name: (put in a global unique name).



- Scroll down on the Create bucket page: - For "Block Public Access setting for this bucket". - Unchecking this will grant S3 bucket access to the internet. - Keep it as check for now.



- Scroll down on the Create bucket page: - For "Bucket Versioning". - We can enable versioning by clicking on "Enable". - Bucket versioning provides a robust and secure way to preserve and retrieve prior versions of objects, enhancing data durability and aiding in data recovery and compliance. - Keep it as "Disable" for now.



- Scroll down on the Create bucket page: - For "Tags". - Tags are defined by the user and can help us track the project cost. - Create tag by: "Add tag". - Key: "Project"; Value: "Basics".



- Scroll down on the Create bucket page: - For "Default encryption". - Encryption type: "Server-side encryption with Amazon S3 managed keys (SSE-S3)". - Bucket key: "Disable".



- Click on "Create bucket" on the bottom of the page.



- Successfully created the S3 Bucket.



Task 2: Upload Content to S3 Bucket

Key Takeaways

- Upload objects to the S3 bucket. - Manage S3 bucket using policy and ACL.

Creating Two Folders in the Bucket

- Navigate into the bucket by clicking on the name.



- Click on "Create folder". Create two folders. One for images and other one for text file.



- Name the first folder "Images". "Do not specify an encryption key" for Server-side encryption. Then, click on "Create folder".



- Click on "Create folder" to create the text file.



- Name the second folder "Text". "Do not specify an encryption key" for Server-side encryption. Then, click on "Create folder".



- Both folders are created successfully.



Upload Images in the Images Folder

- Click on the "Images Folder".



- Click on "Upload".



- Click on "Add files". Upload "AWS logo.png" from the downloadable content.



- Click to expand "Destination details". - We can see that the "Bucket Versioning" is Disabled. - We can see that the "Default encryption type" is Server-side encryption with Amazon S3 managed keys (SSE-S3).



- Click to expand "Permissions". - Select "Specify individual ACL permissions". - We can check the box on Read for "Objects" to have public access. But keep everything default for now.



- Click on expand "Properties". - Make sure "Storage class" is Standard



- Keep everything else default. Scroll down and click on "Upload".



Opening the Image on AWS

- Click on the image name.



- Click on "Open".



- We can access the image by clicking on open. - We used AWS credential to access the image.



- Close the image and try to access the image by clicking on "Object URL".



- Access denied. Because when we create AWS Bucket, we created without public access by default. - When we access the image by Object URL. It is not using AWS credential, you will be treated as anonymous.



Uploading a Text file Accessible to the Public

- Go back to our bucket main page. Click on "Text Folder".



- Click on "Upload"



- Click on "Add files". Select "Text File1.txt". And click on "Upload".



- Click on "Permissions" to expand. - Click on "Grant public-read access". - Check the box for "I understand".



- Click on "Upload".



- Upload failed. Because we are not allowed to upload a publicly accessible file in a bucket that is not publicly accessible.



Changing the Bucket Policy to Public

- Go back to our bucket main page. Click on "Permissions".



- Click on "Edit" for Block public access (bucket settings).



- Uncheck "Block all public access". Click on "Save Changes".



- Type: `confirm` and Click on "Confirm".



Retry to upload the Text File

- Click on "Object".



- Click on "Text Folder".



- Click on "Upload".



- Click on "Add files". Select "Text File1.txt". And click on "Upload".



- Click on "Permissions" to expand. - Click on "Grant public-read access". - Check the box for "I understand".



- Click on "Upload".



- The text file is successfully uploaded.



Access the Text File Using Object URL

- Click on "Text Files1.txt".



- Click on the link for "Object URL".



- We are able to access the Text File1.



- But we are still unable to access the image via Object URL. That is because we did not give public accessible to the image.