- Newest
- Most votes
- Most comments
When deploying a Next.js application with a multi-zone setup using assetPrefix on AWS Amplify, you're encountering an issue where the static folder is being omitted from the build artifacts, resulting in 500 errors due to missing files.
This appears to be a known issue with AWS Amplify's handling of Next.js applications that use assetPrefix. Based on the information available, when you specify an assetPrefix (like "/zone-b"), Amplify may be incorrectly interpreting this configuration and not properly including the static assets in the deployment artifacts.
For a short-term workaround, you might try:
- Modifying your amplify.yml configuration to explicitly include the static files in the artifacts section
- Adjusting your build process to ensure the static files are copied to the expected location
- Opening a support case with AWS under "Account and billing" (which can be done free of charge) to get specific assistance with this issue
Since this appears to be a known issue based on the GitHub issues you referenced, the AWS Amplify team may be working on a fix. In the meantime, reaching out to AWS Support could provide you with a more tailored workaround for your specific setup.
Sources
Unable to deploy Next JS app on Amplify (Please reach out to your support representative.) | AWS re:Post
Deploy React and Server Side Rendered Apps and Static Sites - Amplify Hosting - AWS
Relevant content
asked 5 years ago
asked 4 years ago
- AWS OFFICIALUpdated 4 years ago
- AWS OFFICIALUpdated 5 months ago
