aws-amplify / amplify-hosting

AWS Amplify Hosting provides a Git-based workflow for deploying and hosting fullstack serverless web applications.
https://aws.amazon.com/amplify/hosting/
Apache License 2.0
460 stars 116 forks source link

Next.js ISR not working #2963

Open samymedia opened 2 years ago

samymedia commented 2 years ago

Before opening, please confirm:

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.

Screen Shot 2022-09-02 at 23 33 38 Screen Shot 2022-09-02 at 23 35 38 Screen Shot 2022-09-02 at 23 35 00 Screen Shot 2022-09-02 at 23 26 38

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

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

github-actions[bot] commented 2 years ago

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

CauanCabral commented 2 years ago

Hi, I think we have similar error. Any update?

We try to add revalidate props with 30 seconds on every page, but we are seeing cache persisting for exactly 5 minutes - always.