Difficulty: Intermediate
Compare S3 Standard, S3 Standard-IA and the S3 Glacier classes. How do you decide which storage class to use and move data between them?
S3 Standard is for frequently accessed data with millisecond access and no retrieval fee. S3 Standard-IA (Infrequent Access) stores data for less per GB but charges a per-GB retrieval fee and has a 30-day minimum, so it suits data read a few times a month. The Glacier classes are for archives: Glacier Instant Retrieval still returns data in milliseconds, while Glacier Flexible Retrieval and Deep Archive are the cheapest but need minutes to hours to restore an object before you can read it.
| Class | Retrieval | Min storage duration | Retrieval fee | Typical use |
|---|---|---|---|---|
| Standard | Milliseconds | None | No | Active app data, images, static sites |
| Intelligent-Tiering | Milliseconds (archive tiers optional) | None | No | Unknown or changing access patterns |
| Standard-IA | Milliseconds | 30 days | Yes | Backups, older user uploads |
| One Zone-IA | Milliseconds, single AZ | 30 days | Yes | Re-creatable data like thumbnails |
| Glacier Instant Retrieval | Milliseconds | 90 days | Yes, higher | Medical images, archives read once a quarter |
| Glacier Flexible Retrieval | Minutes to hours after restore | 90 days | Yes | Archives with no urgency |
| Glacier Deep Archive | Within 12 hours (standard) | 180 days | Yes | Compliance data kept 7 to 10 years |
All classes except One Zone-IA (and S3 Express One Zone) store data across at least three AZs and are designed for 99.999999999% (11 nines) durability. Availability differs: Standard is designed for 99.99%, Standard-IA for 99.9%, One Zone-IA for 99.5%.
Use lifecycle rules rather than manual copies. A typical rule for a fintech storing KYC documents: keep in Standard for 30 days, move to Standard-IA, then to Glacier Deep Archive after a year, and expire after the retention period. Lifecycle transitions to Standard-IA or One Zone-IA require objects to be at least 30 days old.
If you cannot predict access, use Intelligent-Tiering. It moves each object between Frequent, Infrequent (after 30 days without access) and Archive Instant Access (after 90 days) tiers automatically, with no retrieval fees, for a small per-object monitoring charge. Objects under 128 KB are not monitored or tiered.
Answering those four questions leads you to the class almost every time.
{
"Rules": [
{
"ID": "kyc-docs-tiering",
"Status": "Enabled",
"Filter": { "Prefix": "kyc/" },
"Transitions": [
{ "Days": 30, "StorageClass": "STANDARD_IA" },
{ "Days": 180, "StorageClass": "GLACIER_IR" },
{ "Days": 365, "StorageClass": "DEEP_ARCHIVE" }
],
"Expiration": { "Days": 2920 },
"NoncurrentVersionExpiration": { "NoncurrentDays": 30 }
}
]
}
Apply this with aws s3api put-bucket-lifecycle-configuration --bucket my-bucket --lifecycle-configuration file://lifecycle.json. Note GLACIER_IR and DEEP_ARCHIVE are the API names for those classes.
# Upload straight into Intelligent-Tiering
aws s3 cp report.pdf s3://acme-archive/reports/ --storage-class INTELLIGENT_TIERING
# Restore a Glacier Flexible Retrieval object for 7 days using the Bulk tier
aws s3api restore-object \
--bucket acme-archive --key logs/2023/app.log.gz \
--restore-request '{"Days":7,"GlacierJobParameters":{"Tier":"Bulk"}}'
# Check restore status (look for ongoing-request="false")
aws s3api head-object --bucket acme-archive --key logs/2023/app.log.gz
A restore creates a temporary readable copy; the archived object stays in its Glacier class.
S3 Standard, S3 Standard-IA, S3 Intelligent-Tiering, S3 Glacier, Lifecycle policies