S3 Storage Classes (Storage Tier) – cost, durability, and availability – can be changed manually or using lifecycle policies.
Link: https://aws.amazon.com/s3/storage-classes/
- Object Durability: The percentage over a one-year period that an object in S3 will not be lost.
- Object Availability: The percentage over a one-year period that an object in S3 will be accessible.
S3 Tiered Storage Classes
Object Storage Classes – Amazon S3
| Tier | AZ Replication | Availability | Lifecycle Transition | Features |
|---|---|---|---|---|
| Standard | 3+ | 99.99 % | Yes | For frequently accessed data |
| Standard IA | 3+ | 99.9 % | Yes | Fast real-time access but less frequently (such as once a month) |
| One Zone IA | 1 | Yes | non-critical or reproducible data | |
| Express One Zone | 1 | 99.95 % | No | HIgh-performance, latency-sensitive, No Lifecycle transition |
| Intelligent Tiering | 3+ | 99.9 % | Yes | For unknown access patterns |
| Glacier Instant Retrieval | 3+ | 99.9 % | Yes | Ideal for data that is accessed once or twice per quarter (few tines a year) and that requires immediate access |
| Glacier Flexible Retrieval | 3+ | 99.99 % | Yes | Backup and archive data that is rarely accessed. |
| Glacier Deep Archive | 3+ | 99.99 % | Yes | Archive data that is very rarely accessed |
- Glacier Flexible Retrieval
- Flexible retrieval
- minutes ~ 12 hours
- Expedited: 1 ~ 5 minutes
- Standard: 3 ~ 5 hours
- Flexible retrieval
- Glacier Deep Archive
- Retrieval time: ~12 hours
- Bulk Retrieval time: ~ 48 hours
- Intelligent Tiering
- only for objects bigger than 128 kB
- for unknown or unpredictable access patterns
- A minimum 30 days before transitioning to IA storage tiers.
- After 30 days, objects that are not accessed are moved to the IA tier.
S3 Pricing
You are changed based on:
- Object’s size
- How long you stored the objects during the month
- Storage Class
| Tier | Retrieval Fee | Minimum Size Charge | Minimum Duration Charge | Features |
|---|---|---|---|---|
| Standard | No | N/A | N/A | Most expensive base fee |
| Standard IA | per GB retrieved | 128 KB | 30 days | Fast real-time access but less frequently (such as once a month) |
| One Zone IA | per GB retrieved | 128 KB | 30 days | non-critical or reproducible data |
| Express One Zone | No | N/A | 1 hour | Cheaper than the Standard |
| Intelligent Tiering | No | 128 KB | N/A | Automatic cost savings |
| Glacier Instant Retrieval | per GB retrieved | 128 KB | 90 days | |
| Glacier Flexible Retrieval | per GB retrieved | N/A | 90 days | Low cost |
| Glacier Deep Archive | per GB retrieved | N/A | 180 days | Very low cost |
Lifecycle Management
Storage classes can be modified on the fly.
- Lifecycle rules are added at a bucket level.
- Lifecycle rules can apply to buckets, prefixes, and tags. Also, they work with current or previous versions of an object.
- Lifecycle automatically moves objects between the different storage tiers.
- You can add a rule to a bucket such as Standard -> Glacier -> Delete.
- Object must stay at least 30 days in S3 Standard before moving to IA or one zone IA. But you can transfer objects directly to Glacier at any time.
S3 Versioning
When the versioning is enabled, any modification of an object generated a new version of the original object.
https://docs.aws.amazon.com/AmazonS3/latest/userguide/versioning-workflows.html
- Once enabled, S3 stores all versions of an object with previous permissions. It is a great backup tool.
- Versioning is per bucket and is disabled by default.
- Once the version is enabled on a bucket, it cannot be disabled – only suspended.
- AWS charges all versions of all objects.
- Older versions can be accessed using the object key and a version ID.
- Specific versions can be deleted. (It is checked with a “delete marker.”)
- Versioning integrates with Lifecycle rules.
- Versioning can use with MFA (Multi-Factor Authentication) Delete, which can provide additional security for accidental deletion or overwrite.
S3 Performance
- Limits
- 3,500 PUT/POST/DELETE operations per second per prefix
- 5,500 GET requests per second per prefix.
- Introduce key randomness (random prefix) to spread load across multiple partitions.
- Prefix is what is between the bucket name and the object name in URL (folders and sub-folders).
- You can get better performance by spreading the reads across different prefixes.
When you use SSE-KMS for encryption, KMS has some limits (KMS has a region-specific quota).
- Use multipart uploads (recommended over 100MB and required over 5GB) to increase upload performance.
- Use S3 Byte-range fetches: download an object in parallel by specifying byte ranges or download the partial amount of file
