# milliHQ/terraform-aws-next-js

Terraform module for building and deploying Next.js apps to AWS. Supports SSR (Lambda), Static (S3) and API (Lambda) pages.

Repository: https://github.com/milliHQ/terraform-aws-next-js
Canonical: https://ross.abutalabs.com/products/terraform-aws-next-js
Homepage: https://registry.terraform.io/modules/milliHQ/next-js/aws
Language: TypeScript
License: Apache-2.0
License Family: permissive
Topics: aws, serverless, nextjs, terraform-module
Last push: 2023-12-14T19:26:52+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 2266, "days_push": 993, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1476, forks 151 (observed 2026-08-28T04:04:50.243333+00:00)

## What it is
A zero-config Terraform module that provisions the full AWS infrastructure needed to self-host Next.js applications serverlessly. It deploys SSR and API pages to Lambda behind CloudFront, and static/SSG pages to S3, with support for rewrites, redirects, and image optimization.

## Use cases
- deploy a next.js app to aws
- self-host next.js serverless on lambda
- terraform module for next.js deployments
- host next.js static and ssr pages on s3 and cloudfront
- deploy next.js api routes to aws lambda
- set up atomic deployments for next.js on aws

## When to choose
- you want to self-host Next.js on AWS without manually wiring Lambda, S3, and CloudFront
- you already use Terraform and want Next.js deployment as code
- you need a mix of static, SSR, and API pages in one deployment

## When to avoid
- you need Next.js middleware, which Lambda@Edge/CloudFront functions do not support
- you deploy to platforms other than AWS
- you prefer managed platforms like Vercel over self-managed infrastructure
- you want actively developed features - the project's latest release is from late 2023

## Facets
- artifact type: infra-config
- maturity: maintenance
- function: infrastructure-as-code, deployment, ssr, serverless, static-site-generator
- domain: web-development, infrastructure-as-code, cloud-computing, self-hosted
- platform: cloud, serverless
- tags: nextjs, terraform-module, aws-lambda, cloudfront, serverless-deployment, ssg, terraform, nodejs

## Member repositories
- milliHQ/terraform-aws-next-js (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:50.243333+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:34:28.173365+00:00, confidence not recorded.
  - readme: https://github.com/milliHQ/terraform-aws-next-js (fetched 2026-08-28T04:04:50.243333+00:00, sha 36611f39792e)
  - homepage: https://registry.terraform.io/modules/milliHQ/next-js/aws (fetched 2026-08-29T11:41:58.029547+00:00, sha 9edc94571ef3)
- Data as of 2026-08-30T08:39:29.467469+00:00.
