Core Concepts
- CloudFront is a global CDN with 400+ edge locations.
- Origins: S3 bucket, EC2 instance, ALB, custom HTTP origin.
- Distributions: Web (HTTP/HTTPS) and RTMP (deprecated).
- Edge locations cache content. Regional edge caches are intermediate.
- TTL controls how long content stays cached.
Security
- OAC (Origin Access Control): recommended for S3 origins (replaces OAI).
- Signed URLs: one file, time-limited access.
- Signed Cookies: multiple files, time-limited access.
- AWS WAF integration for web application protection.
- Field-level encryption for sensitive data.
- SSL/TLS: default CloudFront certificate or custom ACM certificate.
Performance
- Cache behaviors: path pattern matching for different origins.
- Lambda@Edge: run code at edge locations (viewer/origin request/response).
- CloudFront Functions: lightweight functions for viewer request/response.
- Price classes: choose which edge locations to use (cost vs performance).
- HTTP/2 and HTTP/3 support for faster delivery.
Practice CloudFront Questions
Put your knowledge to the test with practice questions.