Reputation: 3316
I followed quite a complicated AWS guide on setting a static hosting for my website, and it’s currently not loading, not sure why. What I have done:
estimate.dev
{
"Version": "2012-10-17",
"Id": "PolicyForPublicWebsiteContent",
"Statement": [
{
"Sid": "PublicReadGetObject",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::estimate.dev/*"
}
]
}
estimate.dev
and index file index.html
estimate.dev
with auto-generated SOA and NS records. Set TTL of 60 seconds for each.
Now the troubleshooting part:
estimate.dev
resolves to AWS IP (it was resolving Registrar IP 2 days ago)ERR_CONNECTION_TIMED_OUT
in Chrome after loading for some timeI tried to delete A record and add a CNAME but it does not allow me to select my S3 bucket there. So I reverted back to A record.
What do I miss here?
Upvotes: 1
Views: 2192
Reputation: 4431
Everything is correct except S3 website endpoint (not the REST API) doesn't support HTTPS and many modern browsers tries for https because of HSTS policy and you'll see connection timeout.
To make it work on HTTPS, you can use CloudFront and set up using below link:
https://aws.amazon.com/premiumsupport/knowledge-center/cloudfront-serve-static-website/
Upvotes: 2