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:
Publicly accessible
.[bucket name].s3-website-ap-southeast-2.amazonaws.com
which has completed deployment.[subdomain].[domain].io
as an alternate domain name within the Cloudfront distribution.[subdomain].[domain].io
[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?
The issue turned out to be that I was using [bucket name].s3-website-ap-southeast-2.amazonaws.com
like the tutorials I'm using take special note to specify. Nowadays it seems you should use [bucket name].s3.ap-southeast-2.amazonaws.com
instead.
Once I made the above update and the distribution was deployed everything started working.