In this recipe, we'll show you how to use AWS CloudFront to cache your website.
The primary reasons you'll want to consider doing this are as follows:
- Copies of your content will be geographically located closer to your end users, thereby improving their experience and delivering content to them faster.
- The burden for serving content will be removed from your fleet of servers. This could potentially result in a large cost saving if you're able to turn off some servers or reduce your bandwidth bill.
- You may need to be shielded from large and unexpected spikes in traffic.
- While not the focus of this chapter, CloudFront gives you the ability to implement a Web Application Firewall (WAF) as an added layer of protection from the bad guys.
- You can serve the contents of a private S3 bucket using TLS, which gives your site the secure HTTPS...