I am trying to use an S3 bucket to redirect from one website to another. The redirect from "http://example.com" works, but I can't get the redirect from "https://example.com", "http://www.example.com" or "https://www.example.com" to work.

I have an S3 bucket called "example.com". I then created a Cloudfront distribution, attached the custom SSL certificate, and added "example.com" and "www.example.com" as Alternate Domain Names.

I'm getting this access denied message:
[![enter image description here](https://i.stack.imgur.com/cUTbO.png)](https://i.stack.imgur.com/cUTbO.png)

I'm assuming that I am not doing something correctly on the policy settings for the S3 bucket. Any guidance?

I am using the following bucket policy:
[![enter image description here](https://i.stack.imgur.com/vmI41.png)](https://i.stack.imgur.com/vmI41.png)

I am not currently using the "Access Control List".