Amazon s3 is also called as Simple Storage Service which is highly scalable, fast and secure object-level storage service in the cloud. This is designed to store and retrieve unlimited data at anytime over the internet. With s3, you could upload any data types in the cloud and could be useful for backup and archiving of data. AWS s3 also maintain authentication and access control in terms of data storage security over the cloud.
There are a lot advantages of using s3. Few of them are below –
- High Scalable & Fast Performance
- Better availability and durability
- Better Security
- Low Cost
- Supports analytics
- Supports wide range of storage class
Below are few key notes related to s3
Buckets – A bucket is said to be a container where you could upload an object into it. It’s also the highest namespace within s3 service. As like in windows C:, D: drives are the highest and as that of root in UNIX, Bucket is topmost level in s3.
You could also configure and add versioning at the time of bucket creation. You could also access an object within a bucket using web hosting. Having said that, if you have an object test/file.png with firsts3 bucket, then you could access the object using http://firsts3.s3.amazonaws.com/test/file.png
Objects – An object is an entity which is stored as a value in s3. Objects are basically consists of object data and metadata. The metadata is a name-value pair that describes an object.
Keys – Each object in s3 is described as an unique identifier. The combination of a bucket, key and version id uniquely identify an object. An object could be easily identified from web hosting URL. In above URL, the bucket is said to be firsts3, key is test and the object is file.png
Regions – AWS s3 allows you to select the region during bucket creation. Once the bucket is created, the object would virtually store over that region and you won’t be able to transfer the data to other region unless you explicitly opt for it.
Data Consistency in s3 – AWS s3 replicate your data across multiple availability zone within the data center for each successful file upload operations to achieve high availability of data in public cloud. As of now, it provides read-after-write consistency in all region for each new object upload via PUT operation with one caveat.
The caveat is if you make a HEAD or GET request to the key name to verify if the object exists before creating the object in s3 bucket, then amazon s3 provides eventual consistency for read-after-write. Eventual consistency supports overwrite PUTS & DELETE in all regions.
For a successful PUT operation, the data is safely stored within the data center in s3. However, the following behaviors may observe when you suddenly try to read or list the object
- Amazon s3 might not return the object in the list for an immediate list keys operation within the bucket when a new process writes a new object to amazon s3.
- Amazon s3 might returns the previous data for immediate read operation when the new process replaces an object in s3.
- Amazon s3 might return the deleted data for immediate read operation when a process deletes an existing bucket in s3.
- Amazon s3 might list the deleted object for immediate list keys within bucket when a process deletes an existing object in s3
Amazon s3 currently does not supports object locking. That means if two simultaneous PUT requests are made for same key, then the request with the latest timestamp would be first priority.
The below section would describe few Amazon s3 features
Storage Classes – AWS s3 provides a wide range of storage class for an end user in Amazon cloud. These includes below
- Amazon s3 STANDARD is useful for frequently accessed data
- STANDARD_IA is useful for Long-lived,infrequently accessed data
- INTELLIGENT_TIERING is useful for long-lived data with changing or unknown access patterns
- OZONE_IA is useful for long-lived,infrequently accessed, non-critical data
- GLACIER is good for long term data archival
- DEEP_ARCHIVE is useful for rarely accessed data with a default retrieval time of 12 hours
Under Frequently accessed object, there is an another storage class called as Reduced_Redundancy storage (RRS) which is used for non critical , reproducible data. This storage class is not recommended to use by Amazon. So you need to prefer STANDARD over RRS.
Bucket Policies – AWS Bucket policy is a resource-based AWS identity and Access management policy. With bucket policy, you could centralize the access on bucket and objects based on various conditions such as restrict an IP address or range of IP’s, restricting specific operation on s3 bucket, requesters etc
AWS s3 policies are related to account and user concept. Having said that, an account can grant specific permission to an user like limited read and write access. Same time, the account could grant other user to create and delete bucket.
With s3 access control list, permission could be granted to only individual objects. However with s3 policies, you can either add or deny permissions across all of objects within a bucket. An account can control access based on specific s3 operations such as GetObject, GetObjectVersion, DeleteObject etc.
AWS Identity and Access Management – Amazon IAM helps to manage access to s3 resources on user as well as group level. With IAM, you could grant one user with read-only access and an another user with read-write access on s3.
Versioning – AWS s3 versioning helps to keep multiple versions of an object in the same bucket. This could help to protect from unintended overwrites and deletions.
Operations – AWS provides few common operations on s3 services. These are
- Create a bucket – This helps to create your own bucket to store objects into it
- Write an object – You could create or overwrite an object within bucket in s3. To write an object, you need to specify a unique key in the namespace of your bucket
- Read an object – You could read the data that is stored in s3 and could download via console or HTTP
- Delete an Object – Delete an object from bucket in s3
- List Keys – This list the keys within bucket in s3 and also could filter the key list based on prefixes
I hope this blog helps to understand s3 and its features in AWS. Please comment if you have any questions or concerns related to this blog.