Create an AmazonS3 bucket in less than 5 minutes
Tags: aws, cloud, s3bucket, cloudskills
Published: 2022-07-06 04:45:58

One of the most popular service on the AWS cloud.

Amazon S3 is an acronym for Amazon Simple Storage Service
An object storage service offering industry-leading scalability, data availability, security, and performance.

It is designed to retrieve any amount of data from anywhere.

## AWS S3 use cases 
Below are some of it popular use cases:

- Data Archival, Infrequent Access & Reduced Redundancy 
- Backup and Disaster Recovery
- Analytics
- Static Website Hosting
- Improve File Sharing
- Create Private Local Repository

Without further Adieu, lets set our timer to 5mins.
![timer](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/khe7pq9yww60ezaq7bx1.gif)


![Countdown Minions](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8qfjp0028zt9iuxuu5cp.gif)



#### Step 1
Login to the AWS console, on the top left corner click on **Services** then click on **Storage** then **S3**

![S3 Navigation](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sjzex2tufuzmn6icrvm6.JPG)

#### Step 2
On the S3 landing page, click **Create Bucket**

![S3 create Bucket](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a4z3drl8ki5st59gk9zp.JPG)
#### Step 3
For the **General Configuration** add your bucket name

> Bucket name must be unique and must not contain spaces or uppercase letters. Every S3 bucket on the cloud must have a unique name.

Popular naming convention is to use the name of the project, your Account ID, then your environment.
In my case its 

```
test-758734324072-dev
```

#### Step 4
Uncheck Block all public access, and make sure to check **I acknowledge that the current settings might result in this bucket and the objects within becoming public.**

This is because we want our S3 bucket publicly accessible.

![AWS S3 public access](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g6rjcb3vuqvhw9lpoias.JPG)

![Acknowledge](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ddkjybmkvaov2h8p4qrh.JPG)

#### Step 5
Leave every other thing as default, then click **Create Bucket**
As soon as this is done, you would be redirected to bucket dashboard.

#### Step 6
On the dashboard, click on the newly created bucket in my case
```
test-758734324072-dev
```
![AWS Bucket Dashboard](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6v3xue7h57myh97vz0lx.JPG)

#### Step 7
click on **Properties**, and copy the **ARN**.
You would need it for the next step.

![ARN](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h40zup2furshgj6nd62y.JPG)

#### Step 8
We have to set the bucket policies.
click **Permissions** then **Bucket policy** click **Edit**

Add the below policy

```
{
"Version":"2012-10-17",
"Statement":[
  {
      "Sid":"Stmt1625306057759",
      "Principal":"*",
      "Action":"s3:*",
      "Effect":"Allow",
      "Resource":"arn:aws:s3:::test-758734324072-dev"
  }
]
}
```
Change the Resource value to your bucket **ARN**, in my case its 
```
arn:aws:s3:::test-758734324072-dev
```

Step 9
Still on the permissions tab scroll down to the last section **Cross-origin resource sharing (CORS)**
click **edit** and add the following configuration.

```
[
 {
     "AllowedHeaders":[
         "*"
     ],
     "AllowedMethods":[
         "POST",
         "GET",
         "PUT",
         "DELETE",
         "HEAD"
     ],
     "AllowedOrigins":[
         "*"
     ],
     "ExposeHeaders":[

     ]
 }
]
```

> Note: for both the Bucket policy and CORS configuration, make sure you don't have any spaces at the beginning of your input, or else, you would encounter errors.

#### Step 10
Lastly click on the **Object** Tab, then click on **Upload**, to upload any file of your choice to the S3 bucket.

![S3 Object Upload](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7vey64j7itb6bpwre46x.JPG)

Thats it folks, you have successfully created an S3 bucket in less than 5mins.


![Rocking Out Eddie Munson](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5o01mcr03xzu6uavbyoo.gif)