7
votes

I am looking for some advices, I am using Next.js to serve static pages that can be updated frequently, my app uses all kind of rendering : SSG, SSR and iSSG (new Incremental Static Site Generation feature).

Exemple of AWS architecture I thought:

  • EC2 to deploy a node.js server running next.js app
  • (if it is possible) Store/update static pages generated by Next.js SSR/iSSG in a S3 bucket
  • Cloudfront to cache pages (using either EC2 or S3 bucket if it is possible)

Do you know what is the best AWS architecture I could use according to my needs?

Edit: Maybe AWS Elastic Beanstalk is the solution, I am taking a look.

Did you found anything? I am thinking to use ECS fargate with EFS to store the build directory at common location.Rishikesh Darandale
you can use serverless nextjs github.com/serverless-nextjs/serverless-next.js It deploys on CloudFront and creates lambda function and uses s3 for storagekartikag01