CloudFront serves static files as a Content Delivery Network (CDN). Having file copies next to your users reduces latency and improves your perceived website speed. Another feature, which we will discuss later, is support for HTTPS requests.
In the next sections, we will create a CloudFront distribution and adjust the Route 53 settings to use CloudFront instead of the S3 bucket.
A CloudFront distribution is what makes it possible to associate a DNS configuration (Route 53) with CloudFront to distribute static content. A distribution needs an origin server to know where the files are stored. In our case, the origin will be the S3 bucket that was previously configured.
Let's perform the following steps to create a CloudFront distribution:
- Browse the CloudFront Management Console at https://console.aws.amazon.com/cloudfront and click on
Create Distribution
:
- The next step is to select the distribution type. For our website, select
Get Started
under the...