title: S3 bucket with SSL with static website
body: <p>I created a bucket and configured a static website hosting</p>
  
  <p>I want to use SSL so instead of using</p>
  
  <p><a href="http://my-bucket.s3-website.us-east-2.amazonaws.com/" rel="nofollow noreferrer">http://my-bucket.s3-website.us-east-2.amazonaws.com/</a></p>
  
  <p>I have to use
  <a href="https://s3.us-east-2.amazonaws.com/my-bucket/" rel="nofollow noreferrer">https://s3.us-east-2.amazonaws.com/my-bucket/</a></p>
  
  <p>the problem with this is that the <strong>static website hosting</strong> endpoint is still <a href="http://my-bucket.s3-website.us-east-2.amazonaws.com/" rel="nofollow noreferrer">http://my-bucket.s3-website.us-east-2.amazonaws.com/</a></p>
  
  <p>I created a redirection rule on it (basically if the requested file returns 404 then I call an API) but is not working because (I assume) the endpoint is the bad one and when I try to access a file that doesn´t exist instead of getting the redirection configured in the static website I get Access Denied. how to deal with this?</p>
  
  <p>notes: I tried to use s3-website.us-east-2.amazonaws.com/my-bucket/file.jpg but I get redirected to an amazon page.</p>