Create CloudFront distribution

  1. Open Amazon CloudFront console.

  2. At CloudFront page.

    • Click Create a CloudFront distribution button. CreateDistribution
    • At Create distribution page.
      • Choose fcj-book-shop-by-myself.s3.us-east-1.amazonaws.com at Origin domain.
      • Enter fcj-book-shop-by-myself.s3.us-east-1.amazonaws.com at Name.
      • Choose Legacy access identities.
      • Click Create new OAI. CreateDistribution
    • At Create new OAI popup.
      • Enter fcj-book-shop-by-myself.s3.us-east-1.amazonaws.com at Name.
      • Click Create button. CreateDistribution
    • At Create distribution page.
      • Scroll down, choose Yes, update the bucket policy at Bucket policy.
      • Choose Redirect HTTP to HTTPS at Viewer protocol policy. CreateDistribution
      • Scroll down, choose Do not enable security protections at Web Application Firewall (WAF). CreateDistribution
      • Scroll down, click Add item button at Alternate domain name (CNAME).
      • Enter <www.chaunguyen.site>.
      • Enter chaunguyen.site.
      • Choose *.chaunguyen.site (…) certificate that you created before. CreateDistribution
      • Scroll down to the bottom, enter index.html at Default root object.
      • Click Create distribution button. CreateDistribution
  3. Open Amazon Route 53.

    • Click Hosted zones on the left menu.
    • Choose chaunguyen.site. CreateDistribution
    • At chaunguyen.site page.
      • Click Create record button. CreateDistribution
    • At Create record page.
      • Enter www at Record name.
      • Choose A - Routes traffic to an IPv4 … at Record type.
      • Enable Alias.
      • Choose Alias to CloudFront distribution.
      • Choose CloudFront distribution you created on the previous step.
      • Click Create records button. CreateDistribution
  4. 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 CreateDistribution