Skip to main content
NestJS serverless guides wrap Express or Fastify. nestrs is Axum-only (ADR-0001). nestrs-lambda takes the router from NestApplication::into_router and serves it with lambda_http (API Gateway HTTP API, REST API, ALB, Function URL).

Install

The crate enables lambda_http features apigw_http and apigw_rest.

Listen on Lambda

Do not call listen / listen_graceful. Those bind a TCP socket. On Lambda, hand the router to listen_lambda:

Local vs Lambda

Share the same AppModule. Swap only main.
PathNormalization and some listen-only builders apply in listen, not into_router. If you rely on trailing-slash rewriting, wrap the router yourself after into_router.

API