Closed kgardnr closed 8 years ago
Continuing to tinker with cloudfront settings, once I have this sorted out I'll document.
Resolved!
Here's what happened:
By default Cloudfront doesn't support a default object for subdirectories in S3 (it doesn't load index.html when you visit a subdirectory.) Based on the way that it's documented, AWS seems to consider this a feature (??).
There's a workaround, which is to set the Cloudfront origin to the URL of the website generated by S3 rather than to the S3 bucket itself. (e.g. http://coralproject-docs.s3-website-us-east-1.amazonaws.com).
TLDR: If you create a Cloudfront districution, enter the URL of the S3 bucket's public site rather than using the dropdown to select the bucket.
If you need to fix an existing Cloudfront distribution, follow these steps.
Apparently this is caused by this issue in AWS Cloudfront:
http://stackoverflow.com/questions/31017105/how-do-you-set-a-default-root-object-for-subdirectories-for-a-statically-hosted
For some reason, Cloudfront sternly refuses to support these sorts of links. There's a workaround, but it doesn't seem to be working as advertised. I'm continuing to tinker with it, hopefully the issue will be resolved soon.