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 installTo run the function locally:
pnpm startThis will start the Serverless Offline server on port 9000.
To deploy the function to AWS:
pnpm run deployTo remove the deployed function from AWS:
pnpm run remove- The
serverless.ymlfile contains the Serverless Framework configuration. - The
tsconfig.jsonfile contains the TypeScript compiler options. - The
package.jsonfile 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.