DEV Community

Cover image for A Walk Through On Amazon S3
Opeyemi Jokanola
Opeyemi Jokanola

Posted on

A Walk Through On Amazon S3

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

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
-Click create bucket

Image description
-Name your bucket and leave it at default

Image description
-Click create bucket

Image description

Yipee, we have successfully created our bucket

Image description
I am going to be uploading one of my favourite animated movies to the S3 bucket

Image description
-Click add file, and upload whatever file you want
Image description
-Click upload

Image description.

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

Image description
See as shown below

Image description

To view the file recently uploaded, you can click open

Image description
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
-Click edit

Image description
-Uncheck the box and click save changes

Image description
-Moving on to create bucket policy, click edit

Image description
-Click on policy generator

Image description
-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

Image description

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

Image description
Access is now public and this can be viewed on any web page

Image description
-Copy and paste the URL into any browser to test

Image description

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

Top comments (0)