1 Answer
- Newest
- Most votes
- Most comments
1
Hello,
Thank you for reaching out to us.
Please follow below steps as mentioned in the link [1] :
-
Please run AWS CLI commands to overwrite how Amplify detects the framework:
aws amplify update-app --app-id <APP_ID> --platform WEB --region <REGION> aws amplify update-branch --app-id <APP_ID> --branch-name <BRANCH_NAME> --framework 'Next.js - SSG' --region <REGION>
-
Then update build spec to point the baseDirectory to out. e.g.
version: 1 frontend: ... artifacts: baseDirectory: out ...
-
Update the build command in your package.json to use next export, then commit this to trigger a new non-SSR build.
-
Finally, go to the "Rewrites and redirects" tab in the Amplify console, and delete the first rewrite rule that was re-writing to their SSR CloudFront distribution.
References:
Relevant content
- Accepted Answerasked a year ago
- asked 10 months ago
- asked 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 2 years ago