Distribute with CloudFront

Create a CloudFront Distribution pointing to the S3 bucket

  • Go to the Cloudfront service. cloudfront_1
  • Create Cloudfront Distribution cloudfront_2
  • Enter a Cloudfront name (for example: flyora-shop). cloudfront_3
  • Select your S3 you have created before cloudfront_4
  • Turn on Website endpoint make sure you get a url like this http://Your-S3-name.s3-website.ap-southeast-1.amazonaws.com/ cloudfront_5
  • Configure:
    • Viewer protocol policy: Redirect HTTP to HTTPS
    • Allowed HTTP method: GET, HEAD , OPTION
    • Cache policy: CatchingOptimized
    • Response headers policy: CORS-with-preflight-and-SecurityHeadersPolicy cloudfront_6
  • Choose do not enable securiy protections cloudfront_7
  • Review and click Create Distribution cloudfront_8
  • After Create Distribution you have to wait for 5 or 10 minutes to deploy and if it deploy successfully it will show you date you have deploy cloudfront_9