I've setup S3 + Cloudfront to host a static website using a subdomain provided by Namecheap, but when navigating to the Cloudfront URL, or domain URL, AWS responds with a 504: "The request could not be satisfied" error.
The steps I've completed are:
- Setup the S3 bucket to have Static website hosting: Enabled with the hosting type set to "Bucket hosting". The bucket is
Publicly accessible
. - Setup a Cloudfront distribution with its origin domain set to
[bucket name].s3-website-ap-southeast-2.amazonaws.com
which has completed deployment. - Set
[subdomain].[domain].io
as an alternate domain name within the Cloudfront distribution. - Assigned a Custom SSL certificate to my distribution that has a status of "Issued" from AWS Certificate Manager for my custom domain
[subdomain].[domain].io
- Setup a CNAME within NameCheap so that
[subdomain]
points to[abc123].cloudfront.net.
which has propagated (confimed by whatsmydns.net)
I'm new to Cloudfront + S3 hosting and trying to skill up, but not hosting in general (I usually use EC2 with either Apache or NGINX).
How can I resolve the 504 error?