~12 min
Amazon S3 prices storage by how quickly and how often you need the data back. S3 Standard costs the most per GB and has no retrieval fee or minimum duration — the right default for data accessed frequently. S3 Standard-IA and S3 One Zone-IA cost less per GB but add a per-GB retrieval fee, aimed at data you access rarely but need back quickly when you do; One Zone-IA costs less again by dropping to a single Availability Zone, trading some durability for a lower price on data you could recreate or that has another copy elsewhere. S3 Glacier Instant Retrieval, Glacier Flexible Retrieval, and Glacier Deep Archive push the price floor progressively lower for data that's rarely, if ever, read back, at the cost of retrieval taking anywhere from milliseconds to many hours.
A lifecycle policy automates the move down that ladder: transition an object to Standard-IA after 30 days, to Glacier Deep Archive after 90, and expire it entirely after a year, all without a person deciding case by case.
json
{
"Rules": [
{
"ID": "archive-old-logs",
"Filter": {"Prefix": "logs/"},
"Status": "Enabled",
"Transitions": [
{"Days": 30, "StorageClass": "STANDARD_IA"},
{"Days": 90, "StorageClass": "DEEP_ARCHIVE"}
],
"Expiration": {"Days": 365}
}
]
}When you genuinely don't know an object's future access pattern — or it changes over time — S3 Intelligent-Tiering removes the guesswork: it monitors access and moves objects between a frequent-access tier and an infrequent-access tier automatically, with no retrieval fees at all, for a small monthly monitoring fee per object. If you do know the pattern — logs nobody reads after 30 days, backups nobody restores — a manually chosen storage class and lifecycle rule is usually cheaper, since you skip Intelligent-Tiering's monitoring fee entirely.
Every infrequent-access and archive tier carries a minimum storage duration — 30 days for Standard-IA and One Zone-IA, 90 days for Glacier Flexible Retrieval, 180 days for Deep Archive. Delete or transition an object before that minimum elapses, and S3 still bills you for the full minimum period, as if you'd left it there. Moving short-lived data into an archive tier to save money can end up costing more than leaving it in Standard.
EBS cost follows the same logic as compute and file storage: pick the volume type that matches the workload's actual need rather than the highest-performing option by default. A gp3 volume with its free baseline (3,000 IOPS, 125 MiB/s) is enough for most workloads and costs meaningfully less than io2 provisioned to the same numbers — reach for io2 only when the workload's IOPS requirement genuinely exceeds what gp3 can provide.
For backups, EBS snapshots are stored in S3 and are incremental: after the first full snapshot, each later one stores only the blocks that changed, so a nightly snapshot schedule costs far less than repeatedly storing the whole volume. A Data Lifecycle Manager policy automates snapshot creation, retention, and deletion the same way an S3 lifecycle policy automates object transitions.
No — deleting before the 180-day minimum still bills for the full 180 days, so this likely costs more than just leaving the logs in S3 Standard for their short 20-day life.