S3 Static Website with SSL error connection refused


I have followed this tutorial:
https://tynick.com/blog/05-30-2019/how-to-create-s3-static-website-with-https-its-so-easy/ .
Everything appears to be set up correctly.
When I access the domain name without https, the site hosted in S3 and using CloudFront is displayed as expected.

However, I have 2 issues:

  1. the request using http is not redirecting to https
  2. the request to https is giving ERR_CONNECTION_REFUSED

How can I troubleshoot this?

Removed markdown link syntax

asked 2 years ago67 views
4 Answers

After some time, the error now is

<Error> <Code>AccessDenied</Code> <Message>Access Denied</Message> <RequestId>792B5983DC3E9308</RequestId> <HostId>a608mjxYCJgaFuU5LZMa7vtiOaqZwhq4ayDwelJbH0OPGc1xVokz2yOJNI2VsErrh34uaLZesuk=</HostId> </Error>
answered 2 years ago

After a time, I am now getting access denied even when accessing via HTTP -- because the redirect to HTTPS started working. So now my website is down, because all requests are getting this

<Error> <Code>AccessDenied</Code> <Message>Access Denied</Message> <RequestId>F6B3F982FA9980FC</RequestId> <HostId>ROXWaxEtdO5sAxnezTwgaF4mA2FzfZGngX5/Ma0u+TUgRwGEYBOhv1pebFzYxtp11gZjBN5YSpA=</HostId> </Error>
answered 2 years ago

My bucket policy is as follows

"Id": "Policy1607294879754",
"Version": "2012-10-17",
"Statement": [
"Sid": "Stmt1607294875912",
"Action": [
"Effect": "Allow",
"Resource": "arn:aws:s3:::bucket-name-here/",
"Principal": "

answered 2 years ago

I had placed "/index.html" by mistake in the "Origin Path" field of the CloudFront origin. When I was double-checking all the settings, removing this value from this field and saving the origin fixed the issue.

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions