Create Cloudfront Distribution and Apply it to the Website

In this step, we will create a Cloudfront Distribution and apply its power to the website.

  1. Access the Cloudfront service, find the Distribution section, select Create. In the Name section, select the name of the bucket you are using to store your web resources. For Origin access, choose Origin access control settings, and under Origin access control, select your bucket name.

Create Cf Step 1

In the Web Application Firewall section, select Do not enable security protections.

Create Cf Step 2

In the Default root object section, enter index.html, then click Create distribution.

Create Cf Step 3

  1. After the distribution is created, click Copy Policy.

Create Cf Step 4

Go back to the Edit policy section of the S3 bucket, paste the newly copied policy, and then click Save changes.

Create Cf Step 5