Skip to content

Commit b57c9a6

Browse files
Update readme with live url
1 parent 504cef6 commit b57c9a6

1 file changed

Lines changed: 13 additions & 10 deletions

File tree

README.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
# NestJS on AWS Lambda with CDK
1+
# NestJS on AWS Lambda with AWS CDK
22

33
Reference implementation of a NestJS application running on AWS Lambda, using AWS CDK for infrastructure, HTTP API Gateway as the entry point, and GitHub Actions for CI/CD.
44

5-
> Companion repository for the blog post **[A Practical Guide to Running Serverless NestJS on AWS Lambda with AWS CDK and GitHub Actions](https://deploy-preview-222--ajeetchaulagain.netlify.app/blog/nestjs-aws-serverless/)**.
5+
> Companion repository for the blog post **[How to Deploy NestJS to AWS Lambda Using CDK and GitHub Actions](https://ajeetchaulagain.com/blog/nestjs-aws-lambda-cdk-deployment/)**.
6+
7+
> **Note:** The NestJS application itself is a default CLI scaffold that returns `Hello World!` from the root endpoint. The focus of this repository is the deployment setup, not the application code.
68
79
## Architecture
810

@@ -12,11 +14,12 @@ A client sends an HTTP request to API Gateway, which forwards it to the Lambda f
1214

1315
## Stack
1416

15-
- **Runtime:** Node.js 24 / NestJS
16-
- **Infrastructure:** AWS CDK (TypeScript)
17-
- **API:** HTTP API Gateway (v2)
18-
- **Lambda Layer:** Production `node_modules` separated from application code
19-
- **CI/CD:** GitHub Actions
17+
- **Application:** NestJS (default scaffold, returns `Hello World!` from `/`)
18+
- **Lambda runtime:** Node.js v20 and above — the handler uses `async/await` and works with any supported runtime. If you use `NODEJS_24_X`, note that the AWS Lambda Node.js 24 runtime dropped support for the callback-style handler, which is why this handler is written using `async/await`.
19+
- **Infrastructure as code:** AWS CDK (TypeScript)
20+
- **API:** HTTP API Gateway (v2) with Lambda proxy integration
21+
- **Dependencies:** Production `node_modules` separated into a Lambda Layer
22+
- **CI/CD:** GitHub Actions — deploys on push to `main` and on pull requests
2023

2124
## Project Structure
2225

@@ -36,7 +39,7 @@ A client sends an HTTP request to API Gateway, which forwards it to the Lambda f
3639

3740
## Prerequisites
3841

39-
- Node.js 24
42+
- Node.js 20 or 24
4043
- AWS CLI configured (`aws configure`)
4144
- AWS CDK bootstrapped in your target account/region (`cdk bootstrap`)
4245

@@ -55,10 +58,10 @@ The application runs locally on `http://localhost:3000`.
5558
5659
## Build
5760

58-
Run the following before deploying:
61+
CDK packages `dist/` and `layer/nodejs/node_modules/` as deployment assets at deploy time — both must be present before running `cdk deploy`. Neither is committed to the repository, so you need to generate them locally first:
5962

6063
```bash
61-
# compile TypeScript → dist/
64+
# Run nest production build → dist/
6265
npm run build
6366

6467
# install production dependencies into layer/nodejs/node_modules/

0 commit comments

Comments
 (0)