https on S3 static website gets stuck

2019-09-15 13:37发布

问题:

I've created an S3 bucket and made it a static website.

If I try a redirect (e.g. to Google) it works fine for HTTP. E.g.

curl -I http://test-s3-redirect.s3-website-eu-west-1.amazonaws.com

but for HTTPS it just hangs eventually returning curl: (7) Failed to connect to test-s3-redirect.s3-website-eu-west-1.amazonaws.com port 443: Operation timed out . E.g.

curl -I https://test-s3-redirect.s3-website-eu-west-1.amazonaws.com

The options I chose in AWS > S3 > Static website hosting were:

  • Redirect requests
  • Target bucket or domain: www.google.com
  • Protocol: https

Any idea why?

回答1:

The redirect protocol (in this case HTTPS) only defines the target protocol for your redirect. Your bucket is still not available with a HTTPS endpoint.

Website Endpoint: Does not support SSL connections.

Key Differences Between the Amazon Website and the REST API Endpoint

If you need SSL support, you put a cloudfront distribution up front.