A Walk Through On Amazon S3
Tags: beginners, aws, s3, cloud
Published: 2023-03-18 14:33:33

Hi folks,
Been a while you read from me, I have just been heating up the stove.
Today I will be writing on one of the most popular and exciting cloud computing services offered by Amazon, **The Amazon S3**. The S3 is also known as Simple Storage Service and it is one of the services used by Netflix to store videos and deliver content to users round the world(before building their own CDN).
S3 is one of the main building blocks of Amazon web services and it is known for its infinity scaling storage. Most website use the Amazon S3 at its back bone. The S3 is known for its reliability, scalabity and avalability.

## Use cases of Amazon S3
1-Popular for its storage and backup
2-Disaster recovery purposes
3-Archieving and retrieving of files
4-Hybrid cloud storage
5-Application hosting
6-Media hosting
7-Data lakes & big data analytics
8-Hosting of static website

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9346ewml1m8v08exuh3x.png)

**Lets take a deep dive with Amazon S3**
The S3 was built to allow people store files into what is known as **buckets** which is seen as top level directories. The files stored in the S3 buckets is known as **objects**. When creating and naming buckets in S3, the name of the bucket must be a globally unique one(i.e it must be named differently from what anyone has used before). The S3 is a global service, however, the buckets are created in a region.
There are things to consider when naming a S3 bucket
1-No use of special character such as underscore, capital letters
2-The name must start with a lower case or number
3-The name is usually between 3-63 characters long

The S3 object files contain what is called **key** which are very long  names with slashes and are made up of prefix+object name. The maximum object size that can be uploaded to the S3 bucket is 5TB.

I will be showing you how to make use of the Amazon S3 through this hands on project, follow along.

-Navigate to the S3 icon and click
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qqt4brkfcyutvtnp18e9.png)
-Click create bucket

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/336rpkvlamgt3031j8d6.png)
-Name your bucket and leave it at default

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mg7zklv91z7ij0rr31mi.png)
-Click create bucket

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4rxyvp4biovp56xx7e67.png)

Yipee, we have successfully created our bucket

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nn4vr73wisx7464ofzie.png)
I am going to be uploading one of my favourite animated movies to the S3 bucket

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/71fha82i1c39bnpt8dqh.png)
-Click add file, and upload whatever file you want
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/msjax2f5mgrv8dgzh0ua.png)
-Click upload

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gomzsjk22a0rralj1e2o.png).

-To get more details about the file uploaded, click the file

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pmascgj33zcw4hxgoyis.png)
See as shown below

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/93cils2h6xg60bklj0xx.png)

To view the file recently uploaded, you can click open

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ntykfsn67ofg57g9a3ms.png)
Taada, we are able to see and view the file uploaded. However, the file uploaded is not for public consumption. 
To make it accessible to the public, I need to change the permission(note that sensitive data should never be made public).

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/py0wlg2dkmk1y35ih5qz.png)
-Click edit

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xmbm77vookm70qqtgan2.png)
-Uncheck the box and click save changes

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8i7akru87tlyp0gbg67c.png)
-Moving on to create bucket policy, click edit

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ytkrbukjveee1aq2nxpw.png)
-Click on policy generator

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gvixphk5gx4cz1asc15v.png)
-Select the policy type to S3 policy, change principal to **"*"**.
Action should be "Getobject"
Put **"/*"** after the ARN name
Add statement and generate policy

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mn90uqmsbfrgnlqoxl3q.png)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oknsumvw13h2i05w10sx.png)

-Copy the generated policy and paste it, then save changes

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ccyhktsl56de57w0qkwk.png)
Access is now public and this can be viewed on any web page

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rljskzyty0qgfak7kbw7.png)
-Copy and paste the URL into any browser to test

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/np4lebt3exshrtfmgxew.png)

Now you can share this URL with anyone on the internet.

That's it folks...

I will be taking a deeper dive in the part two of this series..
Stay tuned..