CloudFront distribution

In addition to using CloudFront to add SSL termination on the website, CloudFront is mostly used as a Content Delivery Network (CDN) to store static assets (such as HTML pages, images, fonts, CSS, and JavaScript) in multiple edge locations around the world, which results in faster downloads and within less response time.

That being said, navigate to CloudFront, and then create a new web distribution. Set the S3 website URL in the Origin Domain Name field and leave the other fields as the default. You may want to redirect the HTTP traffic to HTTPS:

Next, select the SSL certificate we created in the Certificate Manager section and add your domain name to the Alternate Domain Names (CNAMEs) area:

Click on Save and wait a few minutes while CloudFront copies all the files to the AWS edge locations:

Once the CDN is fully deployed, jump to the domain-name-hosted zone page and update the website record to point to the CloudFront distribution domain:

If you go to the URL again, you should be redirected to HTTPS:

Feel free to create a new CNAME record for the API Gateway URL. The record might be https://api.serverlessmovies.com, which points tohttps://51cxzthvma.execute-api.us-east-1.amazonaws.com/production/movies.