Skip to main content
Launch this lab in the IP Lab Portal, then follow the steps below in the AWS console. Open IP Lab Portal

Overview

Lab details

  1. This lab provides a detailed walkthrough of Amazon Simple Storage Service (S3). Amazon S3 offers a user-friendly web interface that allows users to store and access data of any size, from anywhere on the internet, at any time.
  2. In this lab, you will be guided through the process of creating a sample S3 bucket, uploading an object to the bucket, and configuring bucket permissions and policies.
  3. Duration: 60 minutes
  4. AWS Region: US East (N. Virginia) us-east-1

Introduction

What is S3?

  • S3 stands for Simple Storage Service.
  • It provides object storage through a web service interface.
  • Each object is stored as a file with its metadata included and is given an ID number.
  • Objects uploaded to S3 are stored in containers called “Buckets”, whose names are globally unique. They organize the Amazon S3 namespace at the highest level.
  • Amazon S3 creates buckets in the region you specify.
  • You can assign permissions to these buckets to provide or restrict data transactions.
  • Applications use this ID number to access an object.
  • Developers can access an object via a REST API.
  • S3 supports upload of objects.
  • It uses the same scalable storage infrastructure that Amazon.com uses to run its global e-commerce network.
  • It’s designed for storing online backup and archiving of data and applications on AWS.
  • AWS provides various storage classes, including Standard, Standard_IA for infrequent access, Intelligent_Tiering, OneZone_IA, Glacier, Deep_Archive, and RRS (Reduced Redundancy Storage, not recommended by AWS).
  • Data access is provided through the S3 Console.
  • Data stored can be either Public or Private based on user requirement.
  • Data stored can be encrypted.
  • We can define life-cycle policies which can help in automation of data transfer, retention and deletion.
  • Amazon Athena can be used to “query” S3 data.

Architecture diagram

Task details

  1. Sign in to AWS Management Console.
  2. Create an S3 bucket.
  3. Upload an object to S3 Bucket.
  4. Change Bucket permissions.
  5. Create a Bucket Policy.
  6. Test Public Access.
  7. Validation of the lab.

Launching the lab environment

  1. To launch the lab environment, Click on the Launch lab button.
  2. Please wait until the cloud environment is provisioned. It will take less than a minute to provision.
  3. Once the Lab is started, you will be provided with IAM user name, Password, Access Key, and Secret Access Key.
You can only start one lab at any given time

Files you need

Download these before you start — the lab cannot be completed without them.

Lab guide

Lab steps

Task 1: Sign in to AWS Management Console

  1. Click on the Open console button, and you will get redirected to AWS Console in a new browser tab.
  2. On the AWS sign-in page,
  • Leave the Account ID as default. Never edit/remove the 12 digit Account ID present in the AWS Console. otherwise, you cannot proceed with the lab.
  • Now copy your User Name and Password in the Lab Console to the IAM Username and Password in AWS Console and click on the Sign in button.
  1. Once Signed In to the AWS Management Console, Make the default AWS Region as US East (N. Virginia) us-east-1.

Task 2: Creating an S3 Bucket

In this task, we are going to create a S3 bucket by providing the required configurations such as name, region and ACLs.
  1. Ensure you are in the US East (N. Virginia) us-east-1 Region to begin creating an S3 bucket in the Amazon cloud.
  2. Navigate to the Services menu at the top. Click on S3 in the Storage section.
  1. On the S3 Page, click on Create bucket and fill in the bucket details.
    • Select Bucket Type : General purpose
    • Bucket name: Enter Unique name of your choice
      • Note: Ensure you provide a unique bucket name of your choice, as S3 bucket names must be globally unique.
    • For Object ownership: Select ACLs enabled
    • Object ownership option: Choose Object writer
  • Note: Please select Object owner, or else it won’t allow editing the bucket ACL.
  • For Block Public Access settings for this bucket for this bucket section,
    • Uncheck the option**, Block all public access,**
      • Check the I acknowledge that the current settings might result in this bucket and the objects within becoming public checkbox.
  • Leave other settings as default.
  • Click on Create bucket button.
  • Kindly ignore the permission error if it appears during the process.
  1. The S3 bucket will be created successfully.

Task 3: Upload an object to S3 bucket

  1. Click on your bucket name.
  2. In the Overview, You can see the following message:
    • You don’t have any objects in this bucket.
  3. You can upload any image from your local machine or download the image from this Link.
  4. To upload a file to our S3 bucket,
    • Click on the Upload button.
    • Click on Add files button.
    • Browse for your local image or the image we provided and select it.
    • Click on the Upload button.
    • You can watch the progress of the upload from within the transfer panel at the top of the screen.
    • Once your file has been uploaded, it will be displayed in the bucket.
  1. Now click on the Close button on the top right corner of the screen.

Task 4: Change Bucket Permissions

In this task, we are going to change the permissions of the bucket to make the image publicly available.
  1. Under Objects, Click on smiley.jpg, You will see image details like owner, size, link, etc.
  2. A URL will be listed under the Object URL
  3. Copy the Object URL and paste it in the browser in a new tab.
    • You will see an AccessDenied message, which means the object is not publicly accessible.
  4. Go to your smiley.jpg object and navigate to the Permissions tab.
  1. Now click on the Edit button on the right side.
  2. Note: If the Edit button is disabled, please change the bucket ownership to ACLs enabled and choose the Object writer as the owner.
  3. Everyone (public access) : Check the Read checkbox under Objects column.
  1. Now scroll a little bit below and check I understand the effects of these changes on this object checkbox.
  1. Now, Scroll to the bottom and click on Save changes button.
  2. Now again paste the Object URL in the browser and you can see the image you have uploaded.

Task 5: Create a Bucket Policy

  1. In the previous step, you granted read access only to a specific object. If you wish to make all objects inside a bucket available publicly, you can achieve this by creating a Bucket policy.
  2. Go to the bucket by clicking on your bucket name - mys3bucketwhizlabs on the top.
  1. Click the Permissions tab, then configure the following
    • Scroll down to Bucket policy, click on Edit button on the Right side.
    • A blank Bucket policy editor is displayed.
    • Copy the ARN of your bucket to the clipboard.
      • arn:aws:s3:::mys3bucketwhizlabs-test
  2. Copy the entire policy, paste it into the bucket policy, and replace your bucket ARN with the ARN listed in the JSON below.
{
  • Click on Save changes button.

Task 6: Test Public Access

  1. Go to the bucket and upload another image; Download the test logo image from Download Me
    • Click on the Upload button.
    • Click on Add files button.
    • Browse for the downloaded image we provided and select it.
    • Click on the Upload button.
  2. Once the image is uploaded successfully, click on the object name (Image name) , copy the Object URL, and open it in a browser.
  1. You can see your image loaded successfully and is publicly accessible.
Do you know?S3 has a built-in versioning feature that enables users to store multiple versions of an object within a bucket. This functionality is valuable for tracking changes and recovering previous versions of files in case of accidental deletions or data corruption.

Task 7: Validation Test

  1. Once the lab steps are completed, please click on the Check my work button on the left side panel.
  2. This will validate the resources in the AWS account and displays whether you have completed this lab successfully or not.
  3. Sample output :

Completion and conclusion

  1. You have successfully created a new AWS S3 Bucket.
  2. You have successfully uploaded an image to the S3 bucket.
  3. You have learned how to change S3 object permissions.
  4. You have learned how to create an S3 bucket policy.
  5. You have successfully validated the lab.

End lab

  1. Sign out from the AWS Management Console.
  2. Click on End lab button in the IP Lab Portal and wait till the process gets completed

What gets checked

When you press Check my work, the platform verifies each of these:
  • Create an AWS S3 Bucket with Policy — Check whether S3 bucket is created and bucket policy added or not
  • check s3 object — Check whether an object is uploaded to the S3 bucket.
  • Invoke S3 Object URL — Check whether an S3 Object URL is accessible from the internet or not.