Amazon CloudFront is a fast content delivery network (CDN) that aims to deliver image, PDF, audio/video files, live broadcasting, dynamic web content (.html, .css, .js), and APIs. Lambda@Edge is an extension of AWS Lambda that executes functions to customize the content delivered by CloudFront.
A CDN consists of a geographically distributed group of caching servers. Each geographical location situated servers are called an Edge Location or Point of Presence (PoP). It reduces the load on an application origin by caching frequently used content. The aim is to minimize the latency and improve the speed. The following image may help you to understand how the CDN works at a high level, once it is configured:
The preceding diagram can be interpreted as follows:
- An end user accesses the website or an application hosted on a Amazon S3, AWS EC2, or a custom origin. A custom...