I\'m trying to setup 301 redirects on S3 using objects, referenced here http://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html. I\'ve been having some pro
I had the same problem with redirects failing and zero-length files getting downloaded, but wasn't using Cloudfront.
The root cause in my case was my DNS CNAME record pointed to the REST endpoint (static.righto.com.s3-us-west-2.amazonaws.com) instead of the website endpoint (static.righto.com.s3-website-us-west-2.amazonaws.com). Updating the CNAME record fixed my redirects.
Another symptom of this problem was missing pages displayed an XML error page rather than an HTML error page.
This document explains the difference between website endpoints and REST endpoints.