Amazon CloudFront
CloudFront is the CDN layer that caches content close to users in edge locations in front of an origin server. It serves repeated responses faster and reduces how many requests must reach the origin, improving both performance and protection.
▶Architecture Diagram
📊 Data FlowDashed line animations indicate the flow direction of data or requests
If users worldwide hit an origin server or bucket in one region directly, distant users always pay the latency cost and one popular file can overload the origin. Without caching and protection in front of the origin, success itself starts making the system slower.
Early web services had origin servers handle every request directly, which was slow and inefficient for global users. This is why a CDN layer handling caching and delivery optimization in front of the origin became necessary, and CloudFront fills that role.
CloudFront sits in front of origins like S3, ELB, and EC2 and caches content at edge locations. Requests hit the nearest edge, and only cache misses reach the origin. You can combine it with Shield and WAF for origin protection, and Lambda@Edge can modify response behavior close to the user.
CloudFront and Route 53 both appear at the user entry point, but their roles are different. Route 53 decides where to send traffic via DNS, while CloudFront delivers actual responses faster and more securely. If the main problem is mapping a domain to the right service, look at Route 53; if the main problem is edge acceleration for assets and responses, look at CloudFront.
Well-suited for static sites, downloads, images and video, global web frontends, API acceleration, and origin protection. Overkill when caching is not needed and you only need simple domain routing.