Introduction to Amazon CloudFront
Content delivery network that caches content at edge locations worldwide.
- 4 lessons
- Module quiz
Users far from the AWS Region where an application runs experience higher latency, because every request crosses a long network path. Serving the same images, scripts and pages repeatedly from the application also wastes its capacity.
Amazon CloudFront is AWS's content delivery network (CDN). It caches content at hundreds of edge locations around the world, so users receive it from a nearby location, and the origin, such as an S3 bucket, a load balancer or any HTTP server, receives far fewer requests. CloudFront also terminates HTTPS close to users, integrates with AWS WAF and can run code at the edge. It is a global service, charged per gigabyte transferred out and per request, at rates that vary by Region.
Where CloudFront fits
Developer questions about CloudFront focus on controlling what is cached and for how long, keeping origins private, restricting content to authorised users, and customising requests and responses at the edge. A frequent distinction is between CloudFront signed URLs, which control access through a distribution, and S3 presigned URLs, which grant access to an object directly.
How this module is organised
Understanding CloudFront Distributions, Origins and Cache Behaviours introduces edge locations, distributions, origins and cache behaviours. Improving Cache Hit Ratios with CloudFront Cache Policies explains cache keys, policies, time-to-live settings and invalidation. Securing Content with Origin Access Control, Signed URLs and HTTPS explains origin access control, signed URLs and cookies, and HTTPS. Running Code at the Edge with CloudFront Functions and Lambda@Edge compares CloudFront Functions with Lambda@Edge for running code at the edge.
- Understanding CloudFront Distributions, Origins and Cache Behaviours Lesson 1
- Improving Cache Hit Ratios with CloudFront Cache Policies Lesson 2
- Securing Content with Origin Access Control, Signed URLs and HTTPS Lesson 3
- Running Code at the Edge with CloudFront Functions and Lambda@Edge Lesson 4
- Practise and review
- Test your knowledge 8 questions