Amazon CloudFront is a technology provided by Amazon to enable caching of content on edge locations distributed around the world to provide low latency access for client browsers. CloudFront can be incredibly useful in improving performance for your website, even if it is only caching simple things such as your company logo and perhaps some static images.
CloudFront achieves this by using some smart redirection under the bonnet whenever a user accesses a static file stored in S3. If the file that they are attempting to access is part of a CloudFront distribution, AWS will redirect the GET request to a location closer to the end user, which is part of the CloudFront network.
To see how this works, let's follow these steps and take a look at the next diagram:
A user (+) in Europe accesses a website hosted on AWS in Virginia (us-east).
The html for the website is returned...