> ## Documentation Index
> Fetch the complete documentation index at: https://cloud-architect.ipoint-labs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction to Amazon Simple Storage Service (S3)

> Hands-on lab · 45m

Launch this lab in the IP Lab Portal, then follow the steps below in the AWS console.

<a className="ip-lab-portal-btn" href="https://labs.intellectualpoint.com/labs/introduction-to-amazon-simple-storage-service-s3" target="_blank" rel="noreferrer">
  Open IP Lab Portal
</a>

## 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

<img src="https://mintcdn.com/ip-cloud-architect-pathway/f-UHpNVYYLl5zeE0/images/labs/introduction-to-amazon-simple-storage-service-s3/001.png?fit=max&auto=format&n=f-UHpNVYYLl5zeE0&q=85&s=768e3f1df16643e531aef021ad3331bf" alt="" width="860" height="1100" data-path="images/labs/introduction-to-amazon-simple-storage-service-s3/001.png" />

### 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**.

<Note>
  You can only start one lab at any given time
</Note>

## Files you need

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

* [Logo Image](/images/labs/downloads/introduction-to-amazon-simple-storage-service-s3/logo-image.png)

## 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.

3. 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.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/f-UHpNVYYLl5zeE0/images/labs/introduction-to-amazon-simple-storage-service-s3/002.png?fit=max&auto=format&n=f-UHpNVYYLl5zeE0&q=85&s=e1a9f44e238ef3822937de2fdbd46407" alt="" width="2102" height="1106" data-path="images/labs/introduction-to-amazon-simple-storage-service-s3/002.png" />

3. 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**

<img src="https://mintcdn.com/ip-cloud-architect-pathway/f-UHpNVYYLl5zeE0/images/labs/introduction-to-amazon-simple-storage-service-s3/003.png?fit=max&auto=format&n=f-UHpNVYYLl5zeE0&q=85&s=c1262a6761cd6897b818715d299ee371" alt="" width="1001" height="587" data-path="images/labs/introduction-to-amazon-simple-storage-service-s3/003.png" />

* **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.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/f-UHpNVYYLl5zeE0/images/labs/introduction-to-amazon-simple-storage-service-s3/004.png?fit=max&auto=format&n=f-UHpNVYYLl5zeE0&q=85&s=03112827e2685e3590a599256ca5b01c" alt="" width="2968" height="1038" data-path="images/labs/introduction-to-amazon-simple-storage-service-s3/004.png" />

* Leave other settings as default.
* Click on **Create bucket** button.
* Kindly ignore the permission error if it appears during the process.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/f-UHpNVYYLl5zeE0/images/labs/introduction-to-amazon-simple-storage-service-s3/005.png?fit=max&auto=format&n=f-UHpNVYYLl5zeE0&q=85&s=86fa9bf1075d225c20e7ed2596b5d2cf" alt="" width="2978" height="1158" data-path="images/labs/introduction-to-amazon-simple-storage-service-s3/005.png" />

4. The S3 bucket will be created successfully.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/f-UHpNVYYLl5zeE0/images/labs/introduction-to-amazon-simple-storage-service-s3/006.png?fit=max&auto=format&n=f-UHpNVYYLl5zeE0&q=85&s=8be296a3ba39867c4ee27186e7482888" alt="" width="1004" height="119" data-path="images/labs/introduction-to-amazon-simple-storage-service-s3/006.png" />

#### 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.**

     <img src="https://mintcdn.com/ip-cloud-architect-pathway/f-UHpNVYYLl5zeE0/images/labs/introduction-to-amazon-simple-storage-service-s3/007.png?fit=max&auto=format&n=f-UHpNVYYLl5zeE0&q=85&s=34bd9608430e647c4486fa103319ecf8" alt="" width="1101" height="644" data-path="images/labs/introduction-to-amazon-simple-storage-service-s3/007.png" />

3. You can upload any image from your local machine or download the image from this [Link](/images/labs/downloads/introduction-to-amazon-simple-storage-service-s3/logo-image.png).

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.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/f-UHpNVYYLl5zeE0/images/labs/introduction-to-amazon-simple-storage-service-s3/008.png?fit=max&auto=format&n=f-UHpNVYYLl5zeE0&q=85&s=23a77d1d4f93e9a67076778a15800d6d" alt="" width="1044" height="362" data-path="images/labs/introduction-to-amazon-simple-storage-service-s3/008.png" />

5. 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.

     <img src="https://mintcdn.com/ip-cloud-architect-pathway/f-UHpNVYYLl5zeE0/images/labs/introduction-to-amazon-simple-storage-service-s3/009.png?fit=max&auto=format&n=f-UHpNVYYLl5zeE0&q=85&s=d5fc5280fa04e53a49a63189fac2de9a" alt="" width="946" height="190" data-path="images/labs/introduction-to-amazon-simple-storage-service-s3/009.png" />

4. Go to your **smiley.jpg** object and navigate to the **Permissions** tab.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/f-UHpNVYYLl5zeE0/images/labs/introduction-to-amazon-simple-storage-service-s3/010.png?fit=max&auto=format&n=f-UHpNVYYLl5zeE0&q=85&s=e2b2ca7c476c83e11262e332bd125ce3" alt="" width="462" height="126" data-path="images/labs/introduction-to-amazon-simple-storage-service-s3/010.png" />

5. Now click on the **Edit** button on the right side.
6. **Note: If the Edit button is disabled, please change the bucket ownership to ACLs enabled and choose the Object writer as the owner.**
7. **Everyone (public access) :  Check** the **Read** checkbox under **Objects** column.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/f-UHpNVYYLl5zeE0/images/labs/introduction-to-amazon-simple-storage-service-s3/011.png?fit=max&auto=format&n=f-UHpNVYYLl5zeE0&q=85&s=acfb218dda51042f3449ce0347a8f627" alt="" width="715" height="465" data-path="images/labs/introduction-to-amazon-simple-storage-service-s3/011.png" />

8. Now scroll a little bit below and check **I understand the effects of these changes on this object** checkbox.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/f-UHpNVYYLl5zeE0/images/labs/introduction-to-amazon-simple-storage-service-s3/012.png?fit=max&auto=format&n=f-UHpNVYYLl5zeE0&q=85&s=b1a4495809fb0357bab707faadfc4c6b" alt="" width="2862" height="236" data-path="images/labs/introduction-to-amazon-simple-storage-service-s3/012.png" />

9. Now, Scroll to the bottom and click on **Save changes** button.
10. Now again **paste** the Object URL in the browser and you can see the image you have uploaded.

    <img src="https://mintcdn.com/ip-cloud-architect-pathway/f-UHpNVYYLl5zeE0/images/labs/introduction-to-amazon-simple-storage-service-s3/013.png?fit=max&auto=format&n=f-UHpNVYYLl5zeE0&q=85&s=afc948da43443800d32385ff7156fb74" alt="" width="1121" height="755" data-path="images/labs/introduction-to-amazon-simple-storage-service-s3/013.png" />

#### 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.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/f-UHpNVYYLl5zeE0/images/labs/introduction-to-amazon-simple-storage-service-s3/014.png?fit=max&auto=format&n=f-UHpNVYYLl5zeE0&q=85&s=3504442f196864923a241afca833fa06" alt="" width="471" height="54" data-path="images/labs/introduction-to-amazon-simple-storage-service-s3/014.png" />

3. 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**

4. Copy the entire policy, paste it into the bucket policy, and replace your bucket ARN with the ARN listed in the JSON below.

\{

```python theme={null}
"Id": "Policy1",
"Version": "2012-10-17",
"Statement": [
 {
"Sid": "Stmt1",
"Action": [
"s3:GetObject"
 ],
"Effect": "Allow",
"Resource": "replace-this-string-with-your-bucket-arn/*",
"Principal": "*"
 }
 ]
}
```

<img src="https://mintcdn.com/ip-cloud-architect-pathway/f-UHpNVYYLl5zeE0/images/labs/introduction-to-amazon-simple-storage-service-s3/015.gif?s=72b1f6e2a41360b7b30373abcef06e80" alt="" width="971" height="746" data-path="images/labs/introduction-to-amazon-simple-storage-service-s3/015.gif" />

* 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](/images/labs/downloads/introduction-to-amazon-simple-storage-service-s3/logo-image.png)

   * 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.

   * [https://whizlabsresources.s3.amazonaws.com/whizlabs-logo.png](https://whizlabsresources.s3.amazonaws.com/whizlabs-logo.png)

<img src="https://mintcdn.com/ip-cloud-architect-pathway/f-UHpNVYYLl5zeE0/images/labs/introduction-to-amazon-simple-storage-service-s3/016.png?fit=max&auto=format&n=f-UHpNVYYLl5zeE0&q=85&s=e9826df68597960d6146a64ac8003e82" alt="" width="1061" height="451" data-path="images/labs/introduction-to-amazon-simple-storage-service-s3/016.png" />

3. You can see your image loaded successfully and is publicly accessible.

<Tip>
  **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.
</Tip>

#### 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 :

   <img src="https://mintcdn.com/ip-cloud-architect-pathway/f-UHpNVYYLl5zeE0/images/labs/introduction-to-amazon-simple-storage-service-s3/017.gif?s=79aa00a9277911bb8ec8b4b14019701b" alt="" width="989" height="553" data-path="images/labs/introduction-to-amazon-simple-storage-service-s3/017.gif" />

### 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.

## Related help

* [FAQs and Troubleshooting](/aws-cp/support/faqs-and-troubleshooting)
