CloudFront
💡 Definition
Amazon CloudFront is a fast content delivery network (CDN) service that securely delivers data, videos, applications, and APIs to customers globally with low latency and high transfer speeds.
- Edge Locations: CloudFront uses a global network of Edge Locations (Points of Presence) to cache content.
- Distribution: The configuration that tells CloudFront where to get content from (origin) and how to deliver it.
- Origin: The source of your content (e.g., an S3 bucket, an EC2 instance, an Elastic Load Balancer).
- Caching: Content is cached at Edge Locations, so subsequent requests for the same content are served faster.
⚙️ How it Works
- You configure a CloudFront distribution, specifying your origin (where your content is stored).
- When a user requests content, their request is routed to the nearest Edge Location.
- If the content is in the cache at that Edge Location, it's served immediately.
- If not, CloudFront retrieves the content from the origin, caches it, and then delivers it to the user.
🎯 Use Cases
- Website Acceleration: Speeding up the delivery of static and dynamic website content.
- Streaming Media: Delivering video and audio content.
- API Acceleration: Improving the performance of API calls.
- Security: Integrating with AWS WAF for web application firewall protection.
💰 Pricing Model
- Data Transfer Out: Primarily charged for data transferred from CloudFront Edge Locations to the internet.
- HTTP/HTTPS Requests: Charged per request type.
📝 Exam Tips (CLF-C02)
- CloudFront is a global service that utilizes Edge Locations.
- Main benefits are low latency and improved performance.
- Can be used to deliver content from S3 buckets, EC2 instances, and other origins.
See Also: * Edge Location * S3 * Route 53