We are using AWS amplify to develop our next.js application for the first time and trying manual deployment process. We are getting following error when we try to run "amplify publish". This error is frustrating because there is no stack trace to figure out what is causing the issue. I can see the artifacts were successfully loaded to S3 bucket. But deployment fails.
Error:
Export successful
✔ Zipping artifacts completed.
✖ Deployment failed! Please report an issue on the Amplify Console GitHub issue tracker at https://github.com/aws-amplify/amplify-console/issues.
An error occurred during the publish operation
I tried to manually upload the zipped file using the "drag and drop". It feels like its stuck with the message Your build is being queued.... for hours now.
Any help is highly appreciated. This is a huge blocker for us.
https://docs.amplify.aws/guides/hosting/nextjs/q/platform/js/
1) SSG Only:
Inside
package.json
Run this command.
Then, keep every thing the way it is, except this:
2) SSG & SSR:
Inside
package.json
Run this command.
Then, keep every thing the way it is, except this:
Note:
Do not forget to change the
Image
in index.js, because currently AWS does not support next/image.https://docs.amplify.aws/guides/hosting/nextjs/q/platform/js/#deploy-and-host-an-ssg-only-app