How to avoid AWS egress fees for static files
If you store and serve files on AWS, the line item that most often blows past the forecast isn't storage. It's egress: the per-gigabyte charge for data transferred out to the internet. Storage is cheap and predictable; egress scales with how popular your files are, which is exactly the thing you can't control.
Why egress is hard to predict
S3 storage is billed per-GB-month and barely moves. But every download, image view or video play transfers bytes out, and that egress is billed per-GB, with CloudFront adding its own data-transfer and request charges on top. A single asset going viral, a hotlinked image, or a busy launch day can multiply the bill in ways your monthly average never warned you about.
- Storage cost ≈ fixed; egress cost ≈ proportional to traffic you don't control.
- Hotlinking and scrapers transfer real bytes you pay for.
- CloudFront adds data-transfer-out + per-request fees on top of S3.
- The bill arrives after the traffic, too late to react.
Ways to reduce egress on AWS
- Put a CDN in front so repeat requests are served from cache, not from S3 (reduces origin egress, but CloudFront egress still applies).
- Set long cache-control headers and use immutable, hashed filenames.
- Compress assets (Brotli/gzip) and serve modern image formats (WebP/AVIF).
- Block hotlinking and add signed URLs so only your app can serve the files.
- Watch for accidental cross-region transfer, which is billed too.
These help, but they don't remove the core problem: your file-delivery cost is still metered per-GB, so it stays variable and hard to budget.
The other option: flat, predictable pricing
If your need is simply 'store these files and serve them fast', a managed file CDN with flat pricing removes the egress variable entirely. 1CDN, for example, bills by file count on a flat plan (there are no per-GB egress fees) and stores your data in the EU, served over HTTPS, with public links or time-limited private signed links. You trade the infinite flexibility of S3 for a bill you can actually predict.
It isn't the right call for everyone: if you need an S3-compatible object store, lifecycle rules or unlimited-scale buckets, stay on AWS. But for typical product files, images, downloads and documents, flat pricing turns an unpredictable egress line into a fixed number.
Put your files on a simpler, EU-hosted CDN
50 files on the free plan, no credit card.
Get started for free