How to use AWS with Next.js? How to use AWS with Next.js? reactjs reactjs

How to use AWS with Next.js?


Next.js 11 + SST + Lambda@Edge

Serverless deployment was introduced in Next.js 8. This makes it easier for you to deploy your Next.js app to AWS Lambda functions, and take advantage of the serverless architecture. It's often much cheaper to host this way, and faster because you are serving the pages behind a CloudFront CDN network.

The SST framework makes it easy to help build and deploy your Next.js app to your AWS account using a combination of S3, Lambda@Edge and CloudFront. It also helps you configure a custom domain for the endpoint.

Here's an example walking through the setup - https://serverless-stack.com/examples/how-to-create-a-nextjs-app-with-serverless.html