Closed tannerlinsley closed 7 years ago
I've run into this same issue as well as finding some other newish cloudfront features that I'd like to use like setting Origins[].OriginPath to serve from subdirectories. I think that supporting this would involve updating to use a newer version of the cloudfront api. The API used in configure-s3-website seems to be currently locked down to 2012-07-01 which is fairly out of date. I'm not sure what would be involved in updating.
You can now use the latest CloudFront features in the cloudfront_distribution_setting
if you upgrade to version 3.0.0. See https://github.com/laurilehmijoki/s3_website/blob/master/changelog.md#300 for more info.
Please reopen this issue if needed.
@tannerlinsley an example of using s3_website
version 3.0.0
config to reroute all paths to index.html is:
cloudfront_distribution_config:
custom_error_responses:
quantity: 1
items:
- error_caching_min_ttl: 60
error_code: "404"
response_code: "200"
response_page_path: /index.html
This would be crucial for hosting our static single-page app on s3 as described here: https://kkob.us/2015/11/24/hosting-a-single-page-app-on-s3-with-proper-urls/, unless.... there is a better way you know of to properly reroute all paths to
index.html
:)