Processing at the near edge with Amazon CloudFront
Amazon CloudFront is a worldwide Content Distribution Network (CDN), similar to Akamai or CloudFlare. CDNs are global (or sometimes regional) networks of proxy servers that cache copies of content closer to where user requests are coming from. The idea is that the cost of maintaining Points-Of-Presence (POPs) around the world is worth it because of the improved user experience due to lower latencies and/or the bandwidth saved by not transmitting the same large object across the internet over and over.
Fundamental to all CDNs is the ability to dynamically swap out the IP address of a server with one closer to the user each time a request comes in.
Content distribution
Amazon CloudFront uses a construct known as distributions to establish and govern this behavior. When a new distribution is created, it is pointed at an origin – this is the server or service that holds the content we want to cache in our POPs. Amazon CloudFront...