The Problem
You have all your company’s data sitting in Amazon S3 Standard. Compliance requires keeping everything for at least 25 years, but only the most recent 2 years of data needs to be highly available and immediately retrievable. Paying S3 Standard rates for 25 years of data is expensive.
The Solution
Set up an S3 lifecycle policy to transition objects to S3 Glacier Deep Archive after 2 years. Data stays in S3 Standard for the first 2 years (99.99% availability, millisecond retrieval), then automatically moves to the cheapest storage class in AWS for the remaining 23 years.
How It Works
S3 lifecycle policies automate the transition of objects between storage classes based on object age. Here is how to configure this:
Step 1: Create the Lifecycle Rule
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
aws s3api put-bucket-lifecycle-configuration \
--bucket my-data-bucket \
--lifecycle-configuration '{
"Rules": [
{
"ID": "ArchiveAfter2Years",
"Status": "Enabled",
"Filter": {},
"Transitions": [
{
"Days": 730,
"StorageClass": "DEEP_ARCHIVE"
}
]
}
]
}'
Step 2: Verify the Policy
1
aws s3api get-bucket-lifecycle-configuration --bucket my-data-bucket
What Happens Behind the Scenes
- Days 0-730: Objects remain in S3 Standard. High availability (99.99%), immediate retrieval, no retrieval fees.
- Day 731+: Objects automatically transition to Glacier Deep Archive. Storage cost drops to approximately $0.00099 per GB/month (compared to $0.023 per GB/month for S3 Standard).
- Retrieval: If you ever need archived data, standard retrieval takes up to 12 hours. Bulk retrieval is cheaper but takes up to 48 hours.
Cost Comparison
For 1 TB of data stored over 25 years:
| Storage Class | Monthly Cost | 25-Year Cost |
|---|---|---|
| S3 Standard (entire period) | $23.55 | ~$7,065 |
| S3 Standard (2yr) + Glacier Deep Archive (23yr) | Variable | ~$820 |
That is roughly 88% savings over the retention period.
Why Not the Alternatives?
Transition to Glacier Deep Archive immediately — Violates the 2-year immediate access requirement. Glacier Deep Archive retrieval takes up to 12 hours.
S3 Intelligent-Tiering — Designed for unpredictable access patterns. When you know exactly when data becomes cold (after 2 years), a lifecycle policy is simpler, cheaper (no per-object monitoring fee), and more predictable.
S3 One Zone-IA then Glacier Deep Archive — S3 One Zone-IA stores data in a single Availability Zone with only 99.5% availability. This does not meet a “highly available” requirement.
Key Takeaways
- Use S3 lifecycle policies when access patterns are predictable and time-based
- S3 Glacier Deep Archive is the lowest-cost storage class in AWS (~$0.00099/GB/month)
- Lifecycle transitions are automatic and require no manual intervention
- Glacier Deep Archive retrieval takes up to 12 hours (standard) or 48 hours (bulk)
- For 25-year retention, lifecycle + Deep Archive can save ~88% compared to keeping everything in S3 Standard
Never miss a story from us, subscribe to our newsletter