Skip to content
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

Serverless-AWS Deploy: outstanding issues #826

Closed
thedavidprice opened this issue May 8, 2023 · 3 comments
Closed

Serverless-AWS Deploy: outstanding issues #826

thedavidprice opened this issue May 8, 2023 · 3 comments

Comments

@thedavidprice
Copy link
Contributor

thedavidprice commented May 8, 2023

1. Site entry via non-home Routes do not fetch+render

Go directly to this page:

There is no content. In browser network tab, there is no fetch.

If you first navigate to the home page and click the link, everything works:

My guess is this is a Cloudfront issue where cache-hit=true is messing with the Redwood Router.

We've been using Serverless Lift Static-Site plugin — I have no idea how long this behavior has been broken. I tried using the Serverless Lift plugin for SPA in #825 which didn't seem to help or change behavior at all:
https://github.com/getlift/lift/blob/master/docs/single-page-app.md

Video shows working example first. Then broken behavior:
https://user-images.githubusercontent.com/2951/236730309-9fbc357f-d2cf-4212-ae9f-1c90af3ce972.mp4

2. .env.production doesn't work after using the first time for --first-run

Although the documentation requires creating and using .env.production, this file is never accessed when deploying via yarn rw deploy serverless. See:

Additionally, it doesn't seem to work on subsequent uses of --first-run. See:

I suggest the easiest fix is to remove use of .env.production in --first-run and update Docs accordingly

3. Update Serverless Deploy Docs: Custom Functions

Provide instructions about adding custom functions to serverless.yml

@thedavidprice thedavidprice changed the title Serverless-AWS Deploy: outstanding issue Serverless-AWS Deploy: outstanding issues May 8, 2023
@gilliardmacedo
Copy link

I can reproduce the behavior you described, but I can see this error accessing directly the post route:
Screenshot 2023-05-22 at 19 03 08
In this state, even if I click in the title and try to open a post, I got the same blank page. Had to refresh the home to get router working again.

Please forgive me if it's not related, but I had to move to spa plugin too, since static site plugin is broken because of changes in the S3 Bucket creation policy. SPAs have, in the 'Error page' section of CloudFront, a redirect to the index with status code 200 in case of errors(directly accessed routes will cause errors because will firstly try to find a resource in the S3 bucket with that name). This redirect is enough to get stuff working. But seems to be different if the app have prerendered routes.

@thedavidprice
Copy link
Contributor Author

Thank you @gilliardmacedo

This is very helpful:

Please forgive me if it's not related, but I had to move to spa plugin too, since static site plugin is broken because of changes in the S3 Bucket creation policy. SPAs have, in the 'Error page' section of CloudFront, a redirect to the index with status code 200 in case of errors(directly accessed routes will cause errors because will firstly try to find a resource in the S3 bucket with that name). This redirect is enough to get stuff working. But seems to be different if the app have prerendered routes.

@Josh-Walker-GM
Copy link
Collaborator

We've deprecated support for aws-serverless deployment. I'm going to close this issue now.

@Josh-Walker-GM Josh-Walker-GM closed this as not planned Won't fix, can't repro, duplicate, stale Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants