Monday 6 December 2021

AWS S3 (Simple Storage Service)

 AWS S3 (SIMPLE STORAGE SERVICE

What is S3? 

S3 stands for Simple Storage Service and essentially it's object storage in the cloud. It provides secure, durable, and highly scalable object storage. It allows you to store and retrieve any amount of data from anywhere on the web at a very low cost. So it's extremely scalable.And the other cool thing about S3 is it's really, really simple to use.

S3 is object-based storage, and basically it manages data as objects rather than in file systems or data blocks.So you can upload any file type that you can think of to S3 like like image files, text files,videos, web pages etc. But one important point is that you can only store static content on S3 which means you cannot store any dynamic content for now like installing an OS etc.

The total volume of data and the number of objects you can store is unlimited in S3 and the maximum object size can be upto 5 TB as of today.

Where do we store our file in S3?

We store our files in a thing called a bucket. S3 bucket is basically a folder inside S3. Important thing to know is that  S3 bucket name is universal namespace and all AWS accounts share S3 bucket name globally which means each bucket name shall be globally unique on every creation.

What happens when bucket is created?

let' say you created bucket by the name of  s3bucket , you will see that the new URL  will be generated like below

https:// s3bucket.s3.us-east-1.amazonaws.com/file1.txt

So syntax would be like 

https://{name of bucket}.s3.{region where bucket belongs to}.amazonaws.com/{key name means object which will get persisted like file etc}

We can also have versioning with S3 bucket which could be good option for daily monitoring and tracking. 

Some of the objects associated with S3 are 

      i) key

      ii)Value

     iii)Version Id

     iv)metadata

When bucket is created by default bucket is private and in case you want to make objects public then make sure bucket need to be made public first .


General Response Codes

when you upload a file to S3, if that upload is successful, your browser will receive a HTTP 200 code. There shall be many other response code which you can discover from the AWS doc or I will also try to update those later.

How safe and durable is data stored in S3?

So just remember S3 is a safe place to store your files.The data is always spread across multiple devices and facilities in order to ensure availability and durability.So it's not just in a single data center in a single server.It's always spread across multiple devices and multiple facilities.It can be across multiple Availability Zones and this all is done to ensure availability and durability.


How data can be secured in S3?

Data can be secured by enabling 3 ways.

1) Enabling Server side encryption : Whenever new objects gets created all the new objects shall be encrypted by default.

2) Enabling Access control List (ACLs) : Specify what accounts and groups are allowed to access specific objects in a bucket.

3) Enabling Bucket Policies : What operations are allowed in a bucket. Like PUT is allowed by DELETE is not allowed.


Difference between ACLs and Bucket policies:

       ACLs are applied at individual object level in or inside bucket whereas bucket policies are applied at         bucket level.

 

Data consistency model in S3? 

      S3 supports strongly READ-after-Write consistency model in which after every update  new read will        show all new changes immediately.

      Also strong consistency for list operation wherein we can see list showing all the latest write updates.

 

No comments:

Post a Comment