Lesson 19 / 28
CloudFront (CDN) Basics
Speed up delivery with CloudFront edge caching in front of S3 or a load balancer origin.
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.