{"id":15228681,"url":"https://github.com/opennextjs/opennextjs-aws","last_synced_at":"2026-01-22T11:04:42.967Z","repository":{"id":63974913,"uuid":"572248260","full_name":"opennextjs/opennextjs-aws","owner":"opennextjs","description":"Open-source Next.js adapter for AWS","archived":false,"fork":false,"pushed_at":"2025-04-07T20:35:42.000Z","size":23594,"stargazers_count":4617,"open_issues_count":33,"forks_count":148,"subscribers_count":22,"default_branch":"main","last_synced_at":"2025-04-09T16:03:25.595Z","etag":null,"topics":["aws","nextjs","sst"],"latest_commit_sha":null,"homepage":"https://opennext.js.org","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/opennextjs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-29T21:34:22.000Z","updated_at":"2025-04-09T15:26:11.000Z","dependencies_parsed_at":"2023-10-03T02:40:33.553Z","dependency_job_id":"9d4bda2d-d0f8-479e-b319-72e37af6a8a5","html_url":"https://github.com/opennextjs/opennextjs-aws","commit_stats":null,"previous_names":["sst/open-next","serverless-stack/open-next","opennextjs/opennextjs-aws"],"tags_count":143,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opennextjs%2Fopennextjs-aws","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opennextjs%2Fopennextjs-aws/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opennextjs%2Fopennextjs-aws/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opennextjs%2Fopennextjs-aws/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opennextjs","download_url":"https://codeload.github.com/opennextjs/opennextjs-aws/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248193159,"owners_count":21062812,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","nextjs","sst"],"created_at":"2024-09-29T00:01:36.161Z","updated_at":"2026-01-22T11:04:42.960Z","avatar_url":"https://github.com/opennextjs.png","language":"TypeScript","readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://opennext.js.org\"\u003e\n    \u003cpicture\u003e\n      \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"docs/public/logo-dark.svg\"\u003e\n      \u003cimg alt=\"OpenNext\" src=\"docs/public/logo-light.svg\" width=\"300\" /\u003e\n    \u003c/picture\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://discord.gg/opennextjs\"\u003e\u003cimg alt=\"Discord\" src=\"https://img.shields.io/discord/1283128968140161065?style=flat-square\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@opennextjs/aws\"\u003e\u003cimg alt=\"npm\" src=\"https://img.shields.io/npm/v/@opennextjs/aws.svg?style=flat-square\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n\u003ch1 align=\"center\"\u003e\n  \u003ca href=\"https://opennext.js.org/aws\"\u003eDocs\u003c/a\u003e\n\u003c/h1\u003e\n\n## Description\n\nOpenNext 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 classic Node.js Server.\n\n## Features\n\nOpenNext aims to support all Next.js 15 features. Some features are work in progress. If you are running into any problems make sure to check the [docs](https://opennext.js.org/aws) first before you open a [new issue](/issues/new) or visit our [Discord](https://discord.gg/opennextjs) to let us know!\n\n- [x] App \u0026 Pages Router\n- [x] API routes\n- [x] Dynamic routes\n- [x] Static site generation (SSG)\n- [x] Server-side rendering (SSR)\n- [x] Incremental static regeneration (ISR)\n- [x] Middleware\n- [x] Server actions\n- [x] Image optimization\n- [x] [NextAuth.js](https://next-auth.js.org)\n- [x] Running at edge\n- [x] [Almost no coldstart (\\*)](#coldstart)\n\n## Who is using OpenNext?\n\n[Gymshark UK](https://uk.gymshark.com), [Udacity](https://engineering.udacity.com/deploying-next-js-on-the-edge-with-sst-is-sst-the-game-changer-its-claimed-to-be-1f05a0abc27c), [TUDN](https://www.tudn.com), [NHS England](https://github.com/nhs-england-tools/terraform-aws-opennext)\n\n## Configuration\n\n### Configuration file\n\nFor personalisation you need to create a file `open-next.config.ts` at the same place as your `next.config.js`, and export a default object that satisfies the `OpenNextConfig` interface. It is possible to not have an open-next.config.ts file, the default configuration will then be applied automatically.\n\n### Debug mode\n\nOpenNext can be executed in debug mode by setting the environment variable `OPEN_NEXT_DEBUG=true` before your build.\n\nThis will output A LOT of additional logs to the console. This also disable minifying in esbuild, and add source maps to the output. This can result in code that might be up to 2-3X larger than the production build. Do **not** enable this in production.\n\nYou can read more about the configuration in the [docs](https://opennext.js.org/aws/config)\n\n## Preleases\n\nBesides the standard npm releases we also automatically publish prerelease packages on branch pushes (using [`pkg.pr.new`](https://github.com/stackblitz-labs/pkg.pr.new)):\n\n- `https://pkg.pr.new/@opennextjs/aws@main`:\n  Updated with every push to the `main` branch, this prerelease contains the most up to date yet (reasonably) stable version of the package.\n- `https://pkg.pr.new/@opennextjs/aws@experimental`\n  Updated with every push to the `experimental` branch, this prerelease contains the latest experimental version of the package (containing features that we want to test/experiment on before committing to).\n\nWhich you can simply install directly with your package manager of choice, for example:\n\n```bash\nnpm i https://pkg.pr.new/@opennextjs/aws@main\n```\n\n## Contribute\n\nTo run `OpenNext` locally:\n\n1. Clone this repository.\n1. Build `open-next`:\n\n   ```bash\n   cd packages/open-next\n   pnpm build\n   ```\n\n1. Run `open-next` in watch mode:\n\n   ```bash\n   pnpm dev\n   ```\n\n1. Now, you can make changes in `open-next` and build your Next.js app to test the changes.\n\n   ```bash\n   cd path/to/my/nextjs/app\n   path/to/opennextjs-aws/packages/open-next/dist/index.js build\n   ```\n\nThere is also a way to run OpenNext locally. You can read a guide about it [here](https://opennext.js.org/aws/contribute/local_run). Its mostly used for development/debugging purposes.\n\n## Testing\n\nYou can run unit tests with\n\n```bash\npnpm test\n```\n\nYou can tun e2e locally with:\n\n```bash\npnpm -r openbuild:local\npnpm -r openbuild:local:start\n```\n\nAnd in a different shell:\n\n```bash\npnpm e2e:test\n```\n\n## Coldstart\n\nOpenNext provide you with a warmer function that can be used to reduce cold start.\n\nOn Lambda, there are multiple scenarios where a lambda will trigger a cold start even if you have some warmed instance. For example if you have more requests than warm instances you'll get a cold start. Also NextJs lazy load the routes, so even if you hit a warm instance, this specific route might not have been loaded yet.\n\n## Acknowledgements\n\nWe are grateful for the projects that inspired OpenNext and the amazing tools and libraries developed by the community:\n\n- [nextjs-lambda](https://github.com/sladg/nextjs-lambda) by [Jan](https://github.com/sladg) for serving as inspiration for packaging Next.js's standalone output to Lambda.\n- [CDK NextJS](https://github.com/jetbridge/cdk-nextjs/) by [JetBridge](https://github.com/jetbridge) for its contribution to the deployment architecture of a Next.js application on AWS.\n- [serverless-http](https://github.com/dougmoscrop/serverless-http) by [Doug Moscrop](https://github.com/dougmoscrop) for developing an excellent library for transforming AWS Lambda events and responses.\n- [serverless-nextjs](https://github.com/serverless-nextjs/serverless-next.js) by [Serverless Framework](https://github.com/serverless) for paving the way for serverless Next.js applications on AWS.\n\nSpecial shoutout to [@khuezy](https://github.com/khuezy) and [@conico974](https://github.com/conico974) for their outstanding contributions to the project.\n\n---\n\nMaintained by [SST](https://sst.dev). Join our community: [Discord](https://discord.gg/opennextjs) | [YouTube](https://www.youtube.com/c/sst-dev) | [Twitter](https://twitter.com/SST_dev)\n","funding_links":[],"categories":["TypeScript","aws"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopennextjs%2Fopennextjs-aws","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopennextjs%2Fopennextjs-aws","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopennextjs%2Fopennextjs-aws/lists"}