aws-amplify / aws-amplify/amplify-hosting
Next.js ISR not working
- Dominant language
- Dockerfile
- Stars
- 481
- Forks
- 123
- PR merge metrics
- No merged PRs in 30d
Description
### Before opening, please confirm:
- [X] I have checked to see if my question is addressed in the [FAQ](https://github.com/aws-amplify/amplify-hosting/blob/master/FAQ.md).
- [X] I have [searched for duplicate or closed issues](https://github.com/aws-amplify/amplify-hosting/issues?q=is%3Aissue+).
- [X] I have read the guide for [submitting bug reports](https://github.com/aws-amplify/amplify-hosting/blob/master/CONTRIBUTING.md).
- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
### App Id
dk71y9o3vbpq0
### Region
ap-south-1
### Amplify Hosting feature
Not applicable
### Describe the bug
Incremental Static Regeneration is not working, even with the right IAM permission.
and it is detecting the right version, which is Nextjs-SSR.
Since we are migrating from Netlify, everything is working fine over there.
Every time we update the content from Contentful, it's not revalidating the page or even reflecting any changes.
Our Next Js version was 11. x.x, and now we have upgraded to 12.2.5, but it is still the same.
Even Lambda Regeneration(us-east-1) have SQS
Please help us out with this.
PS: Since upgrading to 12.2.5, there has been no issue, but ISR is not working even before the upgrade.


### Expected behavior
ISR revalidation work, meaning every time we make changes from our CMS, it should reflect on the website without building a new build.
### Reproduction steps
We used Amplify Web Console to upload our build.
### Build Settings
```yaml
version: 1
frontend:
phases:
preBuild:
commands:
- npm ci
build:
commands:
- npm run build
artifacts:
baseDirectory: .next
files:
- '**/*'
cache:
paths:
- node_modules/**/*
```
### Additional information
_No response_
Contributor guide
Research direction
Start by reviewing the linked FAQ and CONTRIBUTING guide, then reproduce the report through the Amplify Web Console using the shown Build Settings, npm run build, and .next artifact directory. Check the reported Next.js SSR setup, IAM permission, Lambda regeneration, and SQS details against the expected ISR behavior. Done means Contentful updates revalidate and appear without a new build.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, next.js
- Domain
- cloud, devops, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100