S3 : Simple Storage Service
S3 (Simple Storage Service) : S3 is a simple service interface on internet that can be used to store and retrieve any amount of data, from any where, at any time on web.
S3 has designed to make web-scaling easier.
S3 provides highly scalable, reliable, fact, inexpensive data storage infrastructure on web. Amazon it self uses to run it's own global network of websites.
Terminology
Versioning
- Once versioning is on on a bucket it can't be disabled but it can be suspended
- S3 stores all versions even you delete an object. So space consumed by a file with versioning on is summation of all versions of that file. Don't on versioning for big size files get changed frequently, until a life cycle not configured
- Integrates with life-cycle rules
- Versioning's MFA (Multi Factor Authentication) capability adds additional security layer. It asks for token before deleting.
- Versioning must be on on both source and destination for enabling Cross Region Replication
- You can not configure replication between buckets in same region
- Existing files of bucket not replicated when you configure Cross Region Replication on a bucket, until you do not update existing files. New upload or updated files replicated.
- Deleting specific version or 'delete marker' in source bucket not replicated to destination bucket
- Multiple and multi level cross region replication not supported
- If you configured cross region replication from bucket 1 to bucket 2 and bucket 2 to bucket 3, then when you add or update a file in bucket 1 will be replicated to bucket 2 but not to bucket 3. When you add or update files to bucket 2 manually then only it will be replicated to bucket 3
- You can not configure cross region replication from a bucket to multiple buckets, like bucket A to bucket B and bucket A to bucket C

AWS highly recommend that you choose Create new role to have Amazon S3 create a new IAM role for you. When you save the rule, a new policy is generated for the IAM role that matches the source and destination buckets that you choose. The name of the generated role is based on the bucket names and uses the following naming convention: replication_role_for_source-bucket_to_destination-bucket.
Life Cycle Management
- Life Cycle Management can be used in conjunction with Versioning (can be used with or without versioning enabled)
- Whole bucket or specific folder(s) can be transitioned
- Any object can be transition to S3 IA (S3 Infrequent Access Storage) after reaching 128 kb of file size and minimum 30 days of creation date
- Any object can be archived to Glacier after reaching 30 days of S3 IA (or 60 days of creation days)
- Can be deleted permanently from Glacier after 90 days (Transition to Glacier cost minimum for 90 days)
Deleting Multiple objects from S3 Bucket: The
Multi-Object Delete operation enables us to delete multiple objects from a bucket using a single HTTP request. If we know the object keys that we want to delete, then this operation provides a suitable alternative to sending individual delete requests, that reduce per-request overhead.
POST /?delete HTTP/1.1
Host: bucketname.s3.amazonaws.com
Authorization: authorization string
Content-Length: Size
Content-MD5: MD5
<?xml version="1.0" encoding="UTF-8"?>
<Delete>
<Quiet>true</Quiet>
<Object>
<Key>Key</Key>
<VersionId>VersionId</VersionId>
</Object>
<Object>
<Key>Key</Key>
</Object>
...
</Delete>
Access Control List ACL: In ACL you can configure access for your account, other accounts, public access and S3 log delivery groups on Read/Write objects and Read/Write bucket permissions.
S3 Cors Configuration: Below given is sample Cross origin resource sharing configuration on a bucket.
Transfer Acceleration : You can enable transfer acceleration on a S3 bucket, but it has additional charges.
Labs
Lab 1: S3 Cors configuration - Access a image from another S3 bucket using website url.
Lab 2: S3 Versioning - Store multiple versions, delete a version. delete object and restore a version.
Lab 3: S3 Cross Region Replication - Create multiple buckets, configure Cross Region Replication with multiple scenarios
Lab 4: S3 Life Cycle Management - Configure with old and new console