What is CloudFront?

CloudFront copies your content to locations around the world so it loads fast for everyone.

1 min read

Amazon CloudFront is a content delivery network (CDN). It keeps copies (a cache) of your website, images, videos, and API responses in hundreds of edge locations around the world. A visitor in Tokyo gets files from a nearby edge location instead of your server in Virginia.

Think of it like this

Without a CDN, every customer orders from one central warehouse, and distant customers wait days. CloudFront is a network of local stores stocked with popular items. Most orders are filled locally, and only rare items come from the warehouse.

What you get

  • Speed: lower latency, because content is served close to users.
  • Lower load and cost: cached requests never reach your origin server or S3 bucket.
  • Security: free HTTPS certificates through ACM, DDoS protection with AWS Shield Standard, and optional AWS WAF rules.
  • Edge logic: small functions that rewrite URLs, add headers, or check tokens at the edge.

In our project

NoteSnap's web front-end (HTML, CSS, JS) lives in a private S3 bucket, and CloudFront serves it worldwide over HTTPS.

Key takeaways

  • CloudFront is a CDN that caches content in edge locations near users.
  • It speeds up delivery, reduces load on your origin, and adds HTTPS and DDoS protection.
  • It's the standard way to serve a static website from S3.

Check your understanding

Pick an answer to see the explanation.

  1. 1. What's an 'edge location'?