S3 Storage Classes
Storage classes let you trade retrieval speed for lower cost, from instant Standard to cheap archival Glacier.
Not all data needs the same speed. S3 storage classes let you match cost to access pattern.
| Class | Best for | Retrieval |
|---|---|---|
| S3 Standard | Frequently accessed data | Instant |
| S3 Standard-IA | Infrequent access | Instant (per-GB fee) |
| S3 One Zone-IA | Re-creatable, one AZ | Instant, cheaper |
| S3 Glacier Instant | Archives, rare access | Instant |
| S3 Glacier Deep Archive | Long-term cold storage | Hours |
Intelligent-Tiering
S3 Intelligent-Tiering moves objects between tiers automatically based on how often they are accessed, so you save money without managing it by hand.
Lifecycle rules
Attach a lifecycle policy to a bucket to transition objects to cheaper classes or delete them after a set number of days.
Example
# Upload an object directly into a cheaper storage class
aws s3 cp backup.tar.gz s3://my-app-backups/backup.tar.gz \
--storage-class STANDARD_IA
# Apply a lifecycle rule (rules defined in lifecycle.json)
aws s3api put-bucket-lifecycle-configuration \
--bucket my-app-backups \
--lifecycle-configuration file://lifecycle.jsonWhen to use it
- An application stores frequently accessed user data in S3 Standard but automatically transitions 90-day-old logs to S3 Glacier Instant Retrieval to cut costs.
- A legal firm archives case documents to S3 Glacier Deep Archive at $0.00099/GB/month, accepting 12-hour retrieval times for rarely needed files.
- A media company uses S3 Intelligent-Tiering for video assets of unknown access patterns, letting AWS move them between tiers automatically.
More examples
Upload Object with Storage Class
Uploads a file directly to S3 Standard-IA, suitable for data accessed less than once a month with lower storage cost.
aws s3 cp archive.zip s3://my-bucket/archives/archive.zip \
--storage-class STANDARD_IACreate a Lifecycle Rule for Tiering
Configures a lifecycle rule that automatically moves objects under the logs/ prefix to Glacier after 90 days.
aws s3api put-bucket-lifecycle-configuration \
--bucket my-bucket \
--lifecycle-configuration '{
"Rules": [{
"ID": "MoveToGlacier",
"Status": "Enabled",
"Filter": {"Prefix": "logs/"},
"Transitions": [{
"Days": 90,
"StorageClass": "GLACIER"
}]
}]
}'Check Object's Current Storage Class
Retrieves metadata for a single S3 object, including its current storage class, to verify tiering took effect.
aws s3api head-object \
--bucket my-bucket \
--key archives/archive.zip \
--query '{StorageClass:StorageClass,Size:ContentLength,Modified:LastModified}' \
--output table
Discussion