title: Amazon S3 Redirect and Cloudfront
body: <p>I'm trying to setup 301 redirects on S3 using objects, referenced here <a href="http://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html" rel="noreferrer">http://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html</a>.  I've been having some problems and can't seem to figure out what I'm doing wrong. </p>
  
  <p>What I get is a blank page (0 byte file) as if the 'Website Redirect Location' metadata value is not set.  </p>
  
  <p><strong>What am I doing wrong?</strong></p>
  
  <p><strong>Also, does this work on AWS CloudFront?</strong> </p>
  
  <hr>
  
  <p>My S3 Console Setup
  <img src="https://i.stack.imgur.com/6JiN6.png" alt="S3 Console Setup"></p>
  
  <p>Couple things to note:</p>
  
  <p>I have this setup for hosting a static site. 
  I'm using ssl/https with my own cert uploaded and set on the cloudfront distribution. 
  All the pages seem to work except the redirecting objects. 
  I've tried setting up routing rules but they didn't seem to work in Cloudfront.</p>
  
  <p>I'm trying to access the redirects both through the cloudfront url and the s3 url (<a href="https://s3.amazonaws.com/" rel="noreferrer">https://s3.amazonaws.com/</a>{bucket}/users/sign_in)</p>