OpenNext turns a Next.js build into Lambda packages, and debug mode can make them up to 2-3X larger
Open-source Next.js adapter for AWS
At a glance
- What is it?
- OpenNext is the AWS adapter that takes Next.js build output and repackages it for AWS Lambda or a classic Node.js server. Config lives in one optional file, debug mode disables minification, and prerelease packages track two branches.
- Who is it for?
- Use OpenNext when you have a Next.js app that must run on AWS Lambda and you accept that the adapter, not Next.js, defines what works. Read the feature list against your app before starting, since the project marks some Next.js 15 features as work in progress.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository received new commits within the last day.
- What is it written in?
- Mainly TypeScript, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 24, 2026, and from our analysis. They are not legal advice.
Star history
- opennextjs/opennextjs-aws5,051 ★ · +22
| Repository | 2026-09-23 | 2026-11-24 |
|---|---|---|
| opennextjs/opennextjs-aws | 5k | 5.1k |
22 Stars in the last 62 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
It takes the build output, not your source
OpenNext is not a framework and it does not run your Next.js code directly. It takes the Next.js build output and converts it into packages that can be deployed across a variety of environments. Natively it has support for two targets: AWS Lambda and a classic Node.js Server. That distinction matters for how you think about the adapter, because everything it does happens after `next build`. The checked feature list covers both routers, so App Router and Pages Router applications are in scope, along with API routes, dynamic routes, static site generation, server-side rendering, incremental static regeneration, middleware, server actions, image optimization, NextAuth.js, and running at edge. The stated goal is to support all Next.js 15 features, with the caveat that some features are work in progress.
Debug mode disables minification and inflates the output
There is one environment variable that changes how the build behaves. Setting `OPEN_NEXT_DEBUG=true` before your build puts OpenNext into debug mode. The documented effects are three: it outputs a large amount of additional logs to the console, it disables minifying in esbuild, and it adds source maps to the output. The size consequence is stated plainly, with code that might be up to 2-3X larger than the production build. The instruction is unambiguous: do not enable this in production. Treat it as a local tool. If you are reading a build log from a deployed environment and it is unexpectedly huge, check whether this variable leaked into the deployment environment.
The config file is optional, and its absence is silent
Personalisation happens in a file called `open-next.config.ts`, placed at the same place as your `next.config.js`, exporting a default object that satisfies the `OpenNextConfig` interface. The part worth planning around is what happens when the file is missing: it is possible to have no `open-next.config.ts` at all, and the default configuration is then applied automatically. No warning is described, and no error. So a project can run for a long time on defaults without anyone having read what those defaults are. Further configuration detail lives in the project documentation at opennext.js.org/aws/config rather than in this README. The repository does carry a `docs/` directory and a set of `examples/` directories for reference, including app-router, pages-router, app-pages-router, experimental, shared, and sst.
A warmer helps, but cold starts still arrive
OpenNext provides a warmer function that can be used to reduce cold start, and the README is honest about why that is mitigation rather than a fix. On Lambda there are multiple scenarios where a Lambda triggers a cold start even if you have some warmed instance. The first is arithmetic: if you have more requests than warm instances you get a cold start, so the warmer can only help while warm capacity exceeds demand. The second is Next.js behaviour: Next.js lazy loads the routes, so even if you hit a warm instance, the specific route might not have been loaded yet. A warmed function that has not yet touched your heaviest route still pays for loading it. This is also why the feature list carries the entry almost no coldstart with a footnote marker rather than a flat claim, since the asterisk points at this section.
Two prerelease channels track main and experimental
Alongside the standard npm releases, the project automatically publishes prerelease packages on branch pushes using pkg.pr.new. There are two URLs, and the difference is which branch they follow. `https://pkg.pr.new/@opennextjs/aws@main` updates with every push to the `main` branch and contains the most up to date yet reasonably stable version. `https://pkg.pr.new/@opennextjs/aws@experimental` updates with every push to the `experimental` branch and carries features the maintainers want to test or experiment on before committing to them. Both install directly with a package manager:
npm i https://pkg.pr.new/@opennextjs/aws@mainThe practical implication is that a deployment pinned to the main channel moves when main moves, so it is a moving reference rather than a version you can hold. For anything reproducible, pin a published release instead.
Node 18 and pnpm 9 are the declared floors
The repository root is a private monorepo named `monorepo` at version 0.0.0, licensed MIT, with type module set. The engines field requires Node >=18 and pnpm >=9, so the workspace tooling, not just the adapter, sets your floor. Task running goes through turbo: dev runs `turbo run dev`, build runs `turbo run build`, test runs `turbo run test`, and the end to end target runs `turbo run e2e:test`. Linting is Biome rather than ESLint, with `biome check` and `biome check --fix`. Releases are driven by changesets, through `./.changeset/version` and `./.changeset/release`, and a `.changeset/` directory sits at the top level next to turbo.json and pnpm-workspace.yaml. The clean script is destructive: it runs the turbo clean and then removes node_modules and pnpm-lock.yaml.
Local runs build open-next then point it at your app
The contribution path is worth reading even if you never send a patch, because it shows how the adapter is exercised against a real app. You clone the repository, then build the `open-next` package:
cd packages/open-next
pnpm buildThen run it in watch mode with `pnpm dev`. With the watcher up you make changes in open-next and build your own Next.js app against the local build:
cd path/to/my/nextjs/app
path/to/opennextjs-aws/packages/open-next/dist/index.js buildThat second form is a plain path invocation of the built entry point, which means you can test an unreleased adapter change against your own application without publishing anything. Unit tests run with `pnpm test`. The end to end path is longer: `pnpm -r openbuild:local`, then `pnpm -r openbuild:local:start`, then `pnpm e2e:test` in a different shell. A separate local run guide also exists at opennext.js.org/aws/contribute/local_run, used mostly for development and debugging.
Four projects are credited with the shape of the packaging
The acknowledgements section names the work OpenNext builds on, which tells you where its design decisions came from. nextjs-lambda by Jan served as inspiration for packaging Next.js standalone output to Lambda, which is the core packaging idea. CDK NextJS by JetBridge contributed to the deployment architecture of a Next.js application on AWS. serverless-http by Doug Moscrop is credited for a library that transforms AWS Lambda events and responses, which is the plumbing between the Next.js request handler and the Lambda runtime. serverless-nextjs by the Serverless Framework is credited with paving the way for serverless Next.js applications on AWS. Two individuals, khuezy and conico974, are singled out for outstanding contributions. The project is maintained by SST, with community on Discord, YouTube, and Twitter. Site users named include Gymshark UK, Udacity, TUDN, and NHS England.
Editorial conclusion
Use OpenNext when you have a Next.js app that must run on AWS Lambda and you accept that the adapter, not Next.js, defines what works. Read the feature list against your app before starting, since the project marks some Next.js 15 features as work in progress. Never set OPEN_NEXT_DEBUG=true on a production build, because it turns off minification. If you want unreleased behaviour, install the prerelease package for the branch you need rather than tracking main.
Frequently asked questions
How do I use Next.js on AWS?
Build the app, then run it through OpenNext, which takes the Next.js build output and converts it into packages that can be deployed across a variety of environments. Natively OpenNext has support for AWS Lambda and a classic Node.js Server. Configuration goes in an open-next.config.ts file placed at the same place as your next.config.js, or the default configuration applies automatically.
Can Next.js be used as a backend?
The OpenNext feature list covers the server side pieces Next.js offers: API routes, dynamic routes, server actions, middleware, server-side rendering, and incremental static regeneration. These are listed as supported for the AWS Lambda and classic Node.js Server targets, and the stated goal is to support all Next.js 15 features with some features still work in progress.
Is NextJS free to use?
OpenNext is MIT licensed and is maintained by SST, and its own repository declares the MIT license with a private monorepo root. The adapter runs on AWS infrastructure, so the cost of the platform you deploy to sits outside what this project charges. The README does not state any license fee for the adapter itself.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/opennextjs-opennextjs-aws)Star history chart for your README
[](https://hysenlabs.com/projects/opennextjs-opennextjs-aws)Was this useful?