Closed AndyW22 closed 3 years ago
Hi,
I reproduce the 503 error with the same error in the lambda deploying your repo.
However, something that is also happening is that the CloudWatch logs of the lambda are not in the Amplify app deployed region but a different (random?) one.
For example deploying the app to the eu-west-2 region, the logs are visible in eu-west-1 region, deploying to eu-west-1 and the logs are in eu-central-1 region.
Not everyone seems to reproduce this problem however.
I managed to find out what causes this, it is nextjs V10.2.1, to avoid this error stick with 10.2.0 (or 9.5.6, since amplify technically doesn't support V10+ yet)
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.
Looking for a help forum? We recommend joining the Amplify Community Discord server *-help
channels or Discussions for those types of questions.
Before opening, please confirm:
JavaScript Framework
Next.js
Amplify APIs
Authentication, GraphQL API
Amplify Categories
auth, function
Environment information
Describe the bug
Every page that uses getServerSideProps gives a 503 when hosted on amplify:
This error doesn't occur on pages that are statically generated, the /404 page (which usually has SSG) will load fine, but every server side rendered page has the above error.
This error has only started in the last couple weeks or so, as I have tried redeploying projects that haven't changed at all and this error still occurs. This also happens with a repo using the nextjs template.
Expected behavior
The pages loads correctly
Reproduction steps
The repo used is complete stock app with added getServerSideProps to index.js. If you want to make your own repo, simply run yarn create next-app and add the getServerSideProps from the above repo.
Code Snippet
Log output
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
the lambda edge is deployed on us-east-1 whilst my project isn't.