Hello EveryOne Iam Goutham In this Blog I would like to explain basics of AWS S3.
Simple Storage Service in short S3 a global service is an object storage which means we can store files, images, videos,ppts,pdfs and many more. Unlike database, S3 is not structured.
Files can be upto 5TB and there is unlimited storage in S3.
Files are actually stored in buckets.
Bucket is simply a folder and objects inside bucket can be files , images, pdfs etc.. Bucket name must be unique across global level as s3 generates a URL containing bucket name and region in which bucket has been deployed to access objects in bucket.
Creating our First Bucket
Leave all the configurations by default and allow public access and hit create bucket.
Now click the upload button here we can upload any file .
To view the file that we have uploaded click on the bucket we have created and click the object that we want to view .
Click Open button and we can view object we have uploaded because we have just made the bucket public but not the object, to make the object public click actions and click make object public .Then we would be able to view the object with URL assigned to object instead of this Open button. Both had a difference in URL.
We can even share this link to any one and they would be able to view the object.
Simple ๐ .
Permissions for Buckets and Objects
Through Bucket Policies, we can change permissions on the bucket level.
Through Object Access Control Lists, we can change permissions on the object level.
While changing permissions on bucket level from right side we can choose different statements. To know more about bucket policy and how to create, click policy examples button. Instead of writing bucket policies in json by our own by clicking policy generator button from GUI we can create bucket policy.
We can change object level permissions easily.
Bucket Versioning
We can upload different versions of same object and if some html file using the object then latest version of the object will be used.
We can edit bucket versioning in the properties tab under bucket level.
Once bucket versioning is enabled we can suspend it later on.
Now bucket versioning is enabled we can upload files with same name containing different content as many times as we want instead of replacing with newer file s3 makes versions of new files uploaded as versioning is enabled.
After uploading out.txt 2 times and clicked show versions.
Delete marker will be placed if we delete out.txt by disabling show versions.
Objects out.txt aren't actually deleted if deleted by hiding show versions.
If we want to delete object then enable show versions and delete individual version of the object.
Storage Classes
There are 6 types of storage classes.
s3 Standard
s3 Infrequently Accessed
s3 one zone Infrequently Accessed.
Intelligent Tiering
s3 Glacier
s3 Glacier Deep Archive
Data that is accessed frequently objects come under standard class.
Data that is infrequently accessed and needs mutiple availabilty zones objects come under Infrequently Accessed class.
If data is infrequently accessed and doesn't require multiple availabilty zones objects come under Infrequently Accessed class one zone class.
With the help of intelligent tiering which uses machine learning , data was automatically moved to cost effective tiers.
Galcier and Glacier deep archive are for data archiving we can store any amont of data, retrieval time for Glacier is up to 5 hrs and it is low cost. Glacier deep archive retrieval time is upto 12 hrs and it is the lowest cost storage class.
We can change to which storage class object has to belong through life cycle methods.
Encryption
By default data in objects are encrypted using s3 managed keys.
We can encrypt the data in s3 objects at
Server Side
s3 managed keys
AWS KMS (Key Management Service)
Client Side
We encrypt the data and upload to s3.
We can edit type of encryption by moving to properties tab.
Thats it these are the basics of S3 . Thanks for reading my blog. If you find any thing wrong please let me know.
Have a great day ๐๐๐.