5 ms·
An issue I've encountered with static website hosting on CloudFront+S3 is that if you want `index.html` to be served at the root path of a URL - e.g. https://ww
by jeffnappi 7y ago
An issue I've encountered with static website hosting on CloudFront+S3 is that if you want `index.html` to be served at the root path of a URL - e.g. https://www.yoursite.com/folder/ https://www.yoursite.com/folder/ vs https://www.yoursite.com/folder/index.html https://www.yoursite.com/folder/index.html, you must use the s3 website endpoint rather than the S3 Origin. And in that case, unfortunately, it is not possible to use Origin Access Identity.
- kevinslin 7y agogood news is that you can remedy that now by using lambda@edge to rewrite requests - there's even an aws blog post about it: https://aws.amazon.com/blogs/compute/implementing-default-directory-indexes-in-amazon-s3-backed-amazon-cloudfront-origins-using-lambdaedge/ https://aws.amazon.com/blogs/compute/implementing-default-di...
- fishtacos 7y agoFrom the blog post above: "It does not work on any subdirectory (such as http://www.example.com/about/ http://www.example.com/about/). If you were to attempt to request this URL through CloudFront, CloudFront would do a S3 GetObject API call against a key that does not exist."