This is a TypeScript Lambda template that helps you quickly start developing your AWS Lambda functions. It uses the Serverless Framework for easy deployment and local development.
- 📗 Node.js (v20.x)
- 📘 TypeScript
- ☁️ AWS Lambda
- 🔧 Serverless Framework
- 📦 esbuild (for bundling)
This project doesn't have any production dependencies. All required AWS SDK modules are available in the Lambda runtime environment.
@types/aws-lambda
: TypeScript definitions for AWS Lambda@types/node
: TypeScript definitions for Node.jsesbuild
: JavaScript bundler and minifierserverless
: Serverless Framework CLIserverless-esbuild
: Serverless plugin for using esbuildserverless-offline
: Serverless plugin for local developmenttypescript
: TypeScript compiler
├── serverless.yml
├── package.json
├── pnpm-lock.yaml
├── README.md
├── .npmrc
├── src
│ └── handler.ts
└── tsconfig.json
- Clone this repository
- Install dependencies:
pnpm install
To run the function locally:
pnpm start
This will start the Serverless Offline server on port 9000.
To deploy the function to AWS:
pnpm run deploy
To remove the deployed function from AWS:
pnpm run remove
- The
serverless.yml
file contains the Serverless Framework configuration. - The
tsconfig.json
file contains the TypeScript compiler options. - The
package.json
file lists the project dependencies and scripts.
The boilerplate includes a simple "hello world" function in src/handler.ts
. You can modify this function or add new functions as needed.
This project is licensed under the ISC License. See the LICENSE file for details.