AWS Builder Center

S3 Lifecycle Rules and Intelligent-Tiering

Automate S3 storage class transitions to cut your AWS storage costs.

Senior Manager At Google
Most S3 costs come from data that's rarely accessed but never deleted — logs, backups, old uploads. Lifecycle rules and Intelligent-Tiering automate moving that data to cheaper storage classes without anyone manually auditing buckets.

Storage classes, cheapest to most expensive per GB (roughly)

  • S3 Glacier Deep Archive — cheapest, retrieval takes hours, for data you almost never touch (long-term compliance archives).
  • S3 Glacier Flexible/Instant Retrieval — for infrequently accessed archival data with faster retrieval needs.
  • S3 Standard-IA — infrequent access, lower storage cost, retrieval fee per GB.
  • S3 Standard — default, no retrieval fee, highest storage cost.

Lifecycle rules

Transition objects between classes, or expire them, based on age:
json
1
2
3
4
5
6
7
8
9
10
11
12
{
"Rules": [{
"ID": "archive-old-logs",
"Filter": {"Prefix": "logs/"},
"Status": "Enabled",
"Transitions": [
{"Days": 30, "StorageClass": "STANDARD_IA"},
{"Days": 90, "StorageClass": "GLACIER"}
],
"Expiration": {"Days": 730}
}]
}
This moves logs to Standard-IA after 30 days, Glacier after 90, and deletes them entirely after two years — with zero ongoing manual effort.

Intelligent-Tiering: for unpredictable access patterns

Lifecycle rules require you to know your access pattern in advance (e.g., "logs are rarely read after 30 days"). Intelligent-Tiering instead monitors actual access per object and moves it between frequent/infrequent/archive tiers automatically, for a small monitoring fee per object — worth it specifically when you don't know or can't predict access patterns, and not worth it for data you already know is either hot or cold.

A common mistake

Applying aggressive lifecycle transitions to small objects. Standard-IA and Glacier have minimum billable object sizes and durations — transitioning a large number of very small, short-lived objects can end up costing more than leaving them in Standard, because you pay the minimum regardless of actual size/duration. Check your object size distribution before blanket-applying lifecycle rules across a bucket.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article