# Amazon CloudFront

> Fine in front of AWS origins. Egress was too expensive for big public sites, until the flat-rate plans.

- Verdict: Use when it fits
- Vendor: AWS
- Layer: [Storage and delivery](https://cloudlesslabs.com/stack/layers/storage.md). Job: CDN in front of AWS
- Last reviewed: 18 October 2026, by Nicolas Dao (Cloudless Labs, Sydney)
- Web page: https://cloudlesslabs.com/stack/aws-cloudfront/. The whole stack in one file: https://cloudlesslabs.com/stack/brief.md

I use CloudFront when the client is all-AWS. For anything public and popular, Cloudflare wins on price.

## Use it when

- An AWS-only client, or origins that must stay private inside AWS.

## Don't use it when

- Big, high-traffic public sites on pay-as-you-go pricing: use Cloudflare.

## Pricing

Pay-as-you-go egress is expensive at volume. The flat-rate plans (for example Business: $200 a month for 50 TB) change the argument.

## In my words: what hurts

- Egress cost too high for big, high-traffic sites.

## Gotchas, with fixes

- **Gotcha:** Pay-as-you-go egress can turn a viral page into a big bill.
  **Fix:** Check the flat-rate plans, or put Cloudflare in front.

## Provisioning

Official Pulumi package · Official Terraform provider

## Instead, consider

- [Cloudflare static hosting](https://cloudlesslabs.com/stack/cloudflare-static-hosting/index.md): Websites and public assets.

## Where it fits

- [A website, SPA or PWA](https://cloudlesslabs.com/stack/use-cases/website.md): don't. Not for a public site you can host anywhere. You'd assemble S3, origin access, a certificate and cache invalidations to get what Cloudflare gives you from a GitHub push, and pay-as-you-go egress can turn a viral page into a real bill where Cloudflare charges nothing. CloudFront stays right for all-AWS clients and private AWS origins. Instead: [Cloudflare static hosting](https://cloudlesslabs.com/stack/cloudflare-static-hosting/index.md).

## In The Stack Weekly

- [Week 43: Lambda Web Functions](https://cloudlesslabs.com/weekly/2026-w43/index.md), watching

## Sources

- [CloudFront flat-rate pricing plans](https://aws.amazon.com/cloudfront/pricing/)

## Related

- [Storage and delivery](https://cloudlesslabs.com/stack/layers/storage.md): every tool in this layer, with its verdict
- [The whole stack in one file](https://cloudlesslabs.com/stack/brief.md): every use case and tool, for questions that span many
- [Map of every Markdown file on cloudlesslabs.com, with what each one answers](https://ask.cloudlesslabs.com)
