CRITICAL ERROR: This configuration will NOT work! The tutorial instructs to use S3 bucket origin with OAI, but the bucket is configured as a website endpoint (step 3). AWS Documentation clearly states: “If your origin is an Amazon S3 bucket configured as a website endpoint, you must set it up with CloudFront as a custom origin. That means you can’t use OAC (or OAI).” You must either:
Use the AWS management console, to create a CloudFront distribution and configure this service to serve the S3 Bucket we created earlier.

In the Origin domain field, select the S3 bucket you created earlier.
In the Origin access field, select Legacy access identities

Select Create new OAI -> keep the value name & select Create with OAI as Origin access identity


In the Web Application Firewall (WAF) section & in this lab, select Do not enable security protections
In the Settings section,
index.html which is the object you uploaded in step 2.2 (Loading data)Keep the default values, select Create distribution

Note: In case, your actual customer is globally, you should select Use all edge locations (best performance) to deliver at 450+ Points of Presence(PoP),400+ Edge Locations.

Note: please wait for this status for a few minutes - depending on the number of edge locations you chose to deploy in item 3. In the meantime, you can open another tab to return to the S3 bucket & see what values cloudfront has added to the bucket policy.

