Amazon S3
Published in
3 min readJul 28, 2022
Amazon S3 or Amazon Simple Storage Service is a service offered by Amazon Web Service (AWS) that provides object storage and it’s a main building blocks of AWS, widely popular and deserves its own section. Three main aspect before jump into storages.
Buckets
- Amazon S3 allows people to store objects (files) in ‘Buckets’ (directories).
- Buckets must have a globally unique name.
- Naing convention: No uppercase, No underscore, 3–63 characters long, Not an IP (Internet Protocol), Must start with lowercase letter or number.
Objects
- Objects (files) have a key.
- The key is the full path.
- E.g.: s3://my-bucket/my_file.txt
- There is no concept of ‘directories’ within buckets.
- Just keys with very long names that contain slashes (“/”).
Versioning
- You can version your files in Amazon S3.
- Same key overwrite will increment the ‘version’: 1, 2, 3….
- It is best practice to version your buckets.
- Easy roll back to previous version.
- Protect against unintended deletes (ability to restore a version).
S3 Storage Classes
1) S3 Standard — General Purpose
- High durability (99.999999999%) of objects across multiple availability zone.
- If you store 10,000,000 objects with Amazon S3, you can on average expect to incur a loss of single object once every 10,000 years.
- Best to use for: Big Data Analytics, Mobile & Gaming Applications, Content Distribution.
2) S3 Standard — Infrequent Access (IA)
- Suitable for data that is less frequently accessed, but requires rapid access when needed.
- High durability (99.9999999%) of objects across multiple availability zones.
- 99.9% availability.
- Low cost compared to Amazon S3 Standard.
- Best to use for: As a data store for disaster recovery, backups.
3) S3 One Zone — Infrequent Access (IA)
- Same as Standard IA but data is stored in a single availability zone.
- High durability (99.9999999%) of objects in a single availability zone.
- Data lost when availability zone is destroyed.
- 99.5% availability.
- Low cost compared to Standard IA (by 20%).
- Best to use for: Storing secondary backup copies of on-premise data, or storing data you can recreate
4) Amazon Glacier & Glacier Deep Archive
Amazon Glacier Instant Retrieval
- Millisecond retrieval, good for data accessed once a quarter.
- Minimum storage duration of 90 days.
Amazon Glacier Flexible Retrieval
- Expedited (1 to 5 minutes), Standard (3 to 5 hours), Bulk (5 to 12 hours).
- Minimum storage duration of 90 days.
Amazon Glacier Deep Archive — For Long Term Storage — Cheaper
- Standard (12 hours), Bulk (48 hours).
- Minimum storage duration of 180 days.
5) Intelligent Tiering
- Automatically moves objects between two access tiers based on changing access patterns.
- Designed for durability of 99.999999999% of objects across multiple availability zones.
- Designed for durability of 99.999999999% of objects across multiple availability zones.
S3 Lifecycle Rules
Transition actions:
It defines when objects are transitioned to another storage class.
eg:
- Move to objects to Standard IA class 60 days after creation.
- Move to glacier for archiving after 6 months.
Expiration actions:
Configure objects to expire (delete) after some time.
eg:
- Access log files can be set to delete after a 365 days.