I run a static website on an aws S3 bucket and have cloudfront in front of it to serve https.
Currently the website is only available through www.example.com (Which is what I want).
How can I setup a 301 redirect from non www to the www page?
Examples:
http://example.com =(301 Redirect)> https://www.example.com
https://example.com =(301 Redirect)> https://www.example.com
http://example.com/some-dir/info.jpg =(301 Redirect)> https://www.example.com/some-dir/info.jpg