AWS S3 bucket redirection with https

Viewed 193

I try to make a redirection from one to another domain. It is what I have:

Route53 (basic.domain.com) -> S3 bucket (with redirection to example.domain.com) -> example.domain.com

and this scenario works fine: http://basic.domain.com redirects to example.domain.com

but here I get a timeout: https://basic.domain.com redirects to example.domain.com

I probably should put CloudFront between Route53 and S3 bucket but I am looking for a real redirection. I mean when I type http://basic.domain.com I want to see example.domain.com on the browser address bar.

2 Answers

According to this document: https://docs.aws.amazon.com/AmazonS3/latest/userguide/WebsiteEndpoints.html

Important

Amazon S3 website endpoints do not support HTTPS. For information about using HTTPS with an Amazon S3 bucket, see the following:

How do I use CloudFront to serve HTTPS requests for my Amazon S3 bucket?

Requiring HTTPS for communication between viewers and CloudFront

As the other answer said, you can't use https with s3 weburl. If you want to add https to your static website in s3, you should front it with CloudFront (CF):

If you do this, you will set your basic.domain.com to point to the CF distro that you will create. Also in the CF distro you will be able to redirect http to https. This is not something S3 buckets can do.

Related