Use when it fits · AWS · CDN in front of AWS

Amazon CloudFront

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

In The Stack Weekly: W43: Lambda Web Functions, watching

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

Where it fits

  • A website, SPA or PWA: 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

Sources

Last reviewed by Nicolas Dao

Want this stack in your AWS account?

Cloudless Labs is a Sydney consultancy. We migrate on-premises systems to AWS, build serverless apps on this stack, and coach teams to ship with Claude Code and Codex.

Contact Us

For general inquiries, please contact us at:

For e-learning capabilities, please contact: