I have a domain (example.com) with SSL support. I had a problem trying to redirect a request from www.example.com→ https://example.com.
Error trying to access www.example.com:
The request could not be satisfied.
Bad request.
These URLs work (redirected to https://example.com)
example.comhttp://example.comhttps://example.com
http://www.example.com indicates that the website is not secure, that is, it does not use a certificate.
S3
I created 2 S3 buckets example.com and www.example.com (respectively A and B). Bucket Static website hosting allows you to host a website by pointing to example.com. Bucket B Static website hosting redirects all requests to example.com.
Cloudfront
(CNAME), example.com www.example.com. SSL dist.
53
A, example.com www.example.com, Cloudfront (XX.cloudfront.net)