-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Static website deploy does not work for SPA projects anymore #163
Comments
Per the AWS support::
A potential fix could be to find a way to re-attach the |
Damn, this is annoying. Thanks for the report and digging in. I'll probably have time to look into it this weekend, but if anyone wants to send a PR that addresses that before I'd love to merge it! |
So the OAI currently is too restrictive ? Because of that, Cloudfront gets a 403 from S3 instead of a 404 which means this never gets a chance to apply. As those are static files, I guess broader permissions are not an issue. |
Switch the origin bucket configuration to static website hosting, leaving the configuration on the bucket side, without having to rely on a custom origin access identity. Fix getlift#163, getlift#164
Description
I've been using lift for the past 6 months and it's a great plugin (thanks to all the maintainers).
After updating to lift 1.12.0 and serverless 3.1.0 I noticed a strange behaviour which appears to be related to one of aws-cdk subpackages (I can not pinpoint which one).
For some reason the policy of the bucket is not being set correctly anymore which causes cloudfront to return a 403 instead of rendering index.html when accessing any route (which is needed for SPA projects).
How to Reproduce
Create a simple project with serverless
Put the following in serverless.yml
And run
yarn sls deploy --stage dev
Once deploy is done you can see access the cloudfront domain (xyz.cloudfront.net/whatever) and you get 403 instead of hello
Additional Information
From what I understand the issue is coming from incorrect permissions set on the bucket.
For the latest version which SPA does not work anymore
For the old one that works
The text was updated successfully, but these errors were encountered: