Terraform module for building and deploying Next.js apps to AWS. Supports SSR (Lambda), Static (S3) and API (Lambda) pages.
The Terraform Next.js module for AWS is a zero-config Terraform module designed for self-hosting Next.js sites serverless on AWS Lambda. This module supports various features like unlimited parallel deployments of Next.js apps, support for different types of pages (static, SSG, Lambda, and API pages), automatic expiration of old static assets, rewrites & redirects, and image optimization support.
main.tf file in an empty folder or existing Terraform stack.api_endpoint for creating new deployments.api_endpoint_access_policy_arn to create new users with restricted access.tf-next.tf-next build.tf-next deploy.The Terraform Next.js module for AWS provides a convenient way to host Next.js sites on AWS Lambda with various features like support for different page types, automatic asset expiration, and image optimization. By following the installation guide, users can easily set up the Terraform stack and deploy their Next.js apps using the CLI tool provided. This module simplifies the process of managing and hosting Next.js applications on AWS.