Create CloudFront Distribution
- Open Amazon CloudFront console
- Click Create distribution

- Select the origin domain is fcjdmswebstore bucket, then click Use website endpoint

- Scroll down, in Default cache behavior section, select Redirect HTTP to HTTPS for Viewer protocol policy
- Select CORS-S3Origin for Origin request policy part

- Scroll down, in Settings section, click Add item
- Enter CNAME:
www.fcjdms.click
and fcjdms.click
- Select the SSL certificate you created in previous step

- Scroll down to bottom, enter index.html for Default root object pattern
- Click Create distribution

- Go back to the Route 53 console
- Select Hosted zone in the left menu and select the created hosted zone.
- Click Create record

- Turn on Alias
- Select Alias to CloudFront distribution
- Select the newly created CloudFront distribution
- Click Add another record

- Enter
www
for record name.
- Turn on Alias
- Select Alias to CloudFront distribution
- Select the newly created CloudFront distribution
- Click Create records

- You have created the records for CloudFront distribution.

- Enter the following links in a new tab in your web browser:
http://DOMAIN
, http://www.DOMAIN
, replace all DOMAIN
with your domain name. All those links redirect to the new path, replace http with https.

You have completed the workshop to make the application more secure. In the next workshop, we will implement the search feature with Amazon OpenSearch Service for the application.