What is S3 ?
S3 Provide developers and IT teams with secure, durable , highly scalable object storage. Amazon S3 is easy to use with a simple web service interface to store and retrieve any amount of data from anywhere on the web.
- S3 is a object based i.e. allows you to upload files and store files on the platform.
- Files can be 1 Byte to 5TB.
- There is Unlimited storage.
- Files are stored in Buckets (Here buckets are like directories).
- Buckets have a unique name space for each region.
- Amazon guarantees 99.99% availability for S3 platform.
- Amazon guarantees 99.99999999999% durability for S3 information.
- It can have metadata (Key Value Pairs) on each storage.
- Life cycle management : It can be used in conjunction with versioning and it can be applied to current version and the previous versions. Following actions are allow in conjunction with or without versioning.
- Archive only.
- Permanently Delete only.
- Archive and then permanently delete.
- Versioning : Basically it stores all versions of an object (Including all writes and even if you delete an object) for example : if we have a word file with the data “hello” written in it and we have saved it in the S3 bucket and then we update the word file says “hello world”, the we will have two versions of the file one is “hello” and the second is “hello world”.It is a great back up tool , once enabled, versioning cannot be disabled , only suspended.
- Encryption of Buckets. : We can upload and/Download our data to S3 via SSL encrypted End points and S3 can automatically encrypt data at rest. S3 gives you the choice of managing your keys through AWS key management services (AWS KMS) , having Amazon S3 manage them for you , or providing your own key.
Security of S3 :
- All buckets are private by default.
- Allow access control list (an individual user can only have access to one bucket and only have read only access).
- Integrated with IAM (Using roles for example allows EC2 user to have access S3 buckets by roles).
- All end points are encrypted by SSL.
S3 Functionality :
- Statuc website can be hosted on S3 , there is no need of web servers , you can just uplaod a static HTML to an S3 bucket and take advantage of S3’s durability and high availability.
- Integrates with Cloud front CDN.
- Multi part upload , allow you to upload parts of file concurrently.
- Suggested for a file of 100 MB over , it is required for any file over 5 GB’s.
- Allows us to resume a stopped file upload
S3 Use Case :
- File share for networks
- Origin for Cloud front CDN’s.
- Hosting static files.
- Hosting static websites.
Storage Types :
- Standard S3, 99.99% availability, 99.999999999999% durability.
- Reduced Redundancy Storage – Still has 99.99% availability, but only 99.999% durability over a given year.
- Only use RRS for replaceable data, For example if you have 10000 files you could expect to lose 100 files over 1 year as opposed to 0.00001 file with standard.
What is Glacier ?
Glacier is a extremely low-cost storage service for data archival. Amazon Glacier stores data for as little as $0.01 per gigabyte per month, and is optimized for data that is infrequently accessed and for which retrieval times of 3 to 5 hours are suitable.
Create S3 bucket :
Step 1 : Login to AWS and click on S3.
Step 2 : Now click on Create a bucket . After clicking on the create bucket it will prompt for bucket name and region and then click Next.
Note : Bucket name need to be unique in every region.
Now here we can see the different properties
right now we will skip these step and just simply click on Next. We will cover it later on.
Here we can see our bucket.
Step 3 : Now we will click on the bucket name which we had created.
Now we will create a test folder inside this bucket.
Now we will upload an file in the bucket.
Step 4 : Now we want to see the file path which we have recently uploaded in the bucket. So click on the file name there we can see the complete details about the file.
Here we can see our image link which we have recently uploaded in the S3 bucket.
If we click on the link it will give an error of Access Denied in the xml format.
Note : All the bucket are by default private , we can’t use it publicly until and unless we have given the complete permission.\
Here in our scenario we can not access the uploaded file because it is private as of now. We will make it as public, so that we can access the file which we had uploaded recently.
Now we can see the file which we had uploaded by using that link.
Enable Versioning :
Step 1 : Login to AWS S3 console and and then click on the S3 bucket properties .