Introduction to the AWS S3 Service

Amir Mustafa
AWS in Plain English
5 min readSep 13, 2021

--

The Amazon team has provided various ways in which we can store data in the cloud. The various available storage options are:

a. S3 — storing data in objects format

b. Amazon EBS and EC2 Instance Storage — storing data in Block format

c. Amazon File — storing data in EFS

In this article, we will understand the AWS S3 service and will do hands-on from the AWS console. We will cover other storage in future articles.

AWS S3

→ Amazon guarantees we can store infinite objects in the buckets.

→ It is a global service (i.e. available across all countries).

→ Companies like Netflix, Dropbox, and Reddit are avid users of S3. The popular file storage system Dropbox built its entire storage capacity on top of Amazon S3.

Uses of S3:

→ Different types of files can be stored in AWS S3.

→ Everything in S3 is a bucket. We can store objects in buckets. If we upload an image in the S3 bucket, in the backend it is mapped as an object with buckets.

Hands-on S3

Let us walk through the S3 service and understand it.

→ Go to AWS Console → Search and click S3

→ Though AWS is a global service. Buckets will be available region wise. We need to create our bucket. Click Create bucket.

→ Write the bucket name (It must be a unique name).

→ Choose your nearest AWS Regions. Click the Create bucket button.

→ Your bucket is successfully created. Click on the bucket name.

→ Let us upload an image. It can be any file — image, text, etc. Click the Upload button.

→ Click Add filesupload your image

→ Click Upload button

→ The image is successfully uploaded.

→ Click on the image which you have uploaded. On this page we can see details of the image:

→ There are various ways in which we can open the image from the bucket:

A. Click Open button (Private URL): as shown in the above screenshot: The image opens fine. The URL contains some sensitive information about your account such as a security token. No worry no one can access this without login. 😄

B. Open the URL (Public URL):

→ We get an image Access Denied error. This happens because it is a public URL. Our image or bucket at present is not public. We need to write a Security rule for making it public.

→ This we will write in the immediate next article, as this requires the specific concept of writing Security rules in S3.

Create a directory in S3:

→ We keep files organized by creating directories in S3 (say media, documents).

→ Click on your bucket → Click Create a folder. Write its name (say images)

→ We can now upload the image in the same way inside the directory as shown in the below screen.

→ Our new image is uploaded to the image directory

NOTE: Our image is created inside the image directory. We can see it in the image URL

Delete a directory/file in S3:

→ Select the folder or file to delete → Click the delete button.

→ Type permanently delete in the text box → Click Delete objects button

→ The directory is now successfully deleted.

Video:

Closing Thoughts:

In this article, we have learned ways to upload images, create a directory, private and public URLs of files, delete directory and files from AWS S3.

In the next article, let us understand S3 Securities. We will also see how to write rules for reading public URLs.

I hope you have learnt something new today. Do share this article if it was helpful.

Thank you for being till the end 🙌 . If you enjoyed this article or learned something new, support me by clicking the share button below to reach more people and/or give me a follow on Twitter to see some other tips, articles, and things I learn and share there.

More content at plainenglish.io

--

--

JavaScript Specialist | Consultant | YouTuber 🎬. | AWS ☁️ | Docker 🐳 | Digital Nomad | Human. Connect with me on https://www.linkedin.com/in/amirmustafa1/