Lesson 18 / 26
CloudFront (CDN) Basics
Caching content at edge locations close to users.
What CloudFront does
CloudFront is AWS's CDN: it caches your content (an S3 bucket, a load balancer, any HTTP origin) at edge locations worldwide, so users get it from a nearby location instead of your origin.
Origins & distributions
You create a distribution pointing at an origin (where the real content lives). CloudFront pulls from the origin on a cache miss, then serves subsequent requests from the edge cache.
Cache aggressively where safe
Static assets (images, CSS, versioned JS) can be cached for a long time or forever. Set shorter TTLs only for content that actually changes often.