Data building blocks
Storage classes and egress cost
Object stores price storage by how often you read it. Move cold data to cheaper classes with lifecycle rules, and serve hot content through a CDN, because data leaving the cloud is often the largest bill.
Object storage is cheap to keep and not free to use. Every storage class trades a lower storage price for a higher price to read. Egress is data leaving the cloud for the internet, and it often costs more than storing the data. The design question is which class each object belongs in, and how often it gets read.
Concept
A storage class is a price tier. A lifecycle rule moves objects between tiers by age or prefix. A minimum duration is the shortest time you're billed for, even if you delete the object sooner.
The big idea
Think of a kitchen counter and a storage unit. The counter is convenient but small and expensive per foot. The storage unit is cheap per foot but you must drive there and pay to get things out. Hot data belongs on the counter. Archives belong in the unit.
The analogy breaks at retrieval time. Some archive classes take hours to return an object. Make sure your product can wait that long before you archive something a user might open.
Walking through it
Approximate US-East list prices, as of 2025 to 2026. Check current pricing. The ratios matter more than the exact digits.
| Class | Storage per GB-month | Retrieval | Minimum duration | Use for |
|---|---|---|---|---|
| Standard | About $0.023 | Free, millisecond latency | None | Hot data, served content |
| Standard-IA | About $0.0125 | Per-GB fee | 30 days | Accessed monthly |
| Glacier Instant Retrieval | About $0.004 | Higher per-GB fee | 90 days | Accessed quarterly, needed instantly |
| Glacier Deep Archive | About $0.001 | Hours | 180 days | Compliance archives, last-resort backups |
A lifecycle rule moves old uploads down the tiers automatically:
{
"Rules": [{
"ID": "media-tiering",
"Filter": { "Prefix": "uploads/" },
"Status": "Enabled",
"Transitions": [
{ "Days": 30, "StorageClass": "STANDARD_IA" },
{ "Days": 365, "StorageClass": "DEEP_ARCHIVE" }
],
"AbortIncompleteMultipartUpload": { "DaysAfterInitiation": 3 }
}]
}Work through a store of 500 TB of uploads, where data older than 30 days is rarely read:
All Standard: 500,000 GB × $0.023 = $11,500 / month
100 TB Standard + 400 TB Standard-IA:
100,000 × $0.023 + 400,000 × $0.0125 = $2,300 + $5,000 = $7,300 / month
Savings ≈ $4,200 / month, about $50,000 / year, from one JSON ruleEgress is often the bigger number. Data sent to the internet costs roughly $0.05 to $0.09 per GB on AWS. At 1 PB a month, that's roughly $50,000 to $90,000 in transfer alone. Requests add up too. At about $0.005 per 1,000 PUTs, a billion tiny writes cost $5,000 before a single byte is stored.
So serve public, hot content through a CDN, with the bucket as its origin. Lock the bucket so only the CDN can read it. Serve private files with short-lived signed URLs. Never make a bucket public to get images working. Misconfigured public buckets are a common cause of data leaks.
Common mistakes
- Everything in Standard forever. Old uploads that nobody opens are the cheapest savings.
- Forgetting egress in the estimate. Storage is only part of the bill.
- Public buckets for convenience. Use signed URLs or CDN access instead.
- Archiving something users open daily. Retrieval delays and per-GB fees will hurt.
Check yourself
- Why does moving rarely read files to Standard-IA save money? It stores data at about half the Standard price per GB, and the retrieval fee only applies when you read.
- Why is egress often the bigger bill? Data sent to the internet costs about $0.05 to $0.09 per GB, so 1 PB a month can cost $50,000 to $90,000.
Key takeaways
- Storage classes trade a lower storage price for a higher read price and minimum durations.
- Lifecycle rules can cut storage bills by tens of percent with one config.
- Egress is often the largest cost. Serve hot content through a CDN.
- Keep buckets private. Use signed URLs for private files.
Further learning
The Amazon S3 User Guide lists the current storage class prices and rules.
Next, read about file sync design, which uses chunking to cut storage and transfer costs.
Related
Object storage
Store files and media in S3-style object stores. Keep bytes out of your app servers and databases, and design uploads, metadata and costs around that split.
CDNs and the edge
Serve content from points of presence near users. A CDN cuts latency, absorbs attacks and cuts bandwidth costs, and its cache keys, headers and purge rules decide how well it works.
Case study: video streaming
YouTube and Netflix-style delivery, with resumable uploads, parallel transcoding into a bitrate ladder, HLS and DASH adaptive streaming, and CDN economics.