{"id":42905106,"url":"https://github.com/leanstacks/lambda-starter","last_synced_at":"2026-01-30T16:14:06.141Z","repository":{"id":326699887,"uuid":"1106480315","full_name":"leanstacks/lambda-starter","owner":"leanstacks","description":"An AWS Lambda starter kit for Node.js TypeScript serverless functions.","archived":false,"fork":false,"pushed_at":"2026-01-29T16:31:42.000Z","size":529,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-30T04:47:15.053Z","etag":null,"topics":["lambda","nodejs","serverless","typescipt"],"latest_commit_sha":null,"homepage":"","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/leanstacks.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-29T10:37:27.000Z","updated_at":"2026-01-23T16:39:33.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/leanstacks/lambda-starter","commit_stats":null,"previous_names":["leanstacks/lambda-starter"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/leanstacks/lambda-starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leanstacks%2Flambda-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leanstacks%2Flambda-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leanstacks%2Flambda-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leanstacks%2Flambda-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leanstacks","download_url":"https://codeload.github.com/leanstacks/lambda-starter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leanstacks%2Flambda-starter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28915035,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T12:13:43.263Z","status":"ssl_error","status_checked_at":"2026-01-30T12:13:22.389Z","response_time":66,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["lambda","nodejs","serverless","typescipt"],"created_at":"2026-01-30T16:14:01.201Z","updated_at":"2026-01-30T16:14:06.135Z","avatar_url":"https://github.com/leanstacks.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lambda Starter\n\nA Lambda starter kit for Node.js TypeScript serverless functions.\n\n## Overview\n\nThis project provides a solid foundation for implementing Serverless Microservice Patterns with AWS Lambda functions using Node.js and TypeScript. The project uses the AWS CDK for infrastructure as code, Jest for testing, and modern development tooling.\n\nThere are many Serverless Microservice Patterns which may be implemented with AWS Lambda functions. This project illustrates the \"Simple Web Service\" pattern, which is one of the most frequently used.\n\n## Getting started\n\n### Prerequisites\n\nBefore you begin, ensure you have the following installed:\n\n- **[Node Version Manager (NVM)](https://github.com/nvm-sh/nvm)** - Manages Node.js versions\n- **Node.js** - JavaScript runtime (install via NVM)\n- **npm** - Package manager (comes with Node.js)\n- **AWS CLI** - For AWS credentials and configuration (recommended)\n\n#### Setting up Node.js with NVM\n\nThis project uses the Node.js version specified in `.nvmrc`. See the [official nvm guide](https://github.com/nvm-sh/nvm) for additional information.\n\n```bash\n# Install NVM (if not already installed)\ncurl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash\n\n# Install and use the correct Node.js version\nnvm install\nnvm use\n\n# Verify installation\nnode --version  # Should output same version as in .nvmrc\n```\n\n#### Installing Dependencies\n\n```bash\n# Install project dependencies\nnpm install\n```\n\n## Project structure\n\nThis is a high-level overview of the project structure. This structure separates the infrastructure as code from the Lambda application code. Within the Lambda microservice component, directories provide structure to implement DRY (Don't Repeat Yourself) code which follows the SRP (Single Responsibility Principle).\n\n```\n/docs                           # Project documentation\n\n/infrastructure                 # AWS CDK infrastructure code\n  /stacks                       # CDK stack definitions\n  /utils                        # CDK utilities and helpers\n  app.ts                        # CDK app entry point\n  cdk.json                      # CDK configuration\n  jest.config.ts                # Infrastructure Jest configuration\n  package.json                  # Infrastructure dependencies and scripts\n  tsconfig.json                 # Infrastructure TypeScript configuration\n  .env.example                  # Infrastructure example .env\n\n/src                            # Application source code\n  /handlers                     # Lambda function handlers\n  /models                       # Data models and types\n  /services                     # Business logic services\n  /utils                        # Utility functions and helpers\n\neslint.config.mjs               # ESLint configuration\njest.config.ts                  # Jest testing configuration\npackage.json                    # Project dependencies and scripts\ntsconfig.json                   # TypeScript configuration\n.nvmrc                          # Node.js version specification\n.prettierrc                     # Prettier formatting configuration\n.editorconfig                   # Editor configuration\n```\n\n## How to use\n\n### Commands and scripts\n\n#### Development Commands\n\n```bash\n# Build TypeScript to JavaScript\nnpm run build\n\n# Clean generated files and directories\nnpm run clean\n```\n\n#### Code Quality Commands\n\n```bash\n# Format code with Prettier\nnpm run format\n\n# Check code formatting without making changes\nnpm run format:check\n\n# Lint code with ESLint\nnpm run lint\n\n# Lint and auto-fix issues\nnpm run lint:fix\n```\n\n#### Testing Commands\n\n```bash\n# Run tests without coverage\nnpm test\n\n# Run tests with coverage report\nnpm run test:coverage\n\n# Run tests in watch mode (reruns on file changes)\nnpm run test:watch\n```\n\n### LocalStack Support\n\nThis project includes full support for [LocalStack](https://localstack.cloud/), allowing you to run and test the microservice locally without deploying to AWS. See the [LocalStack Guide](docs/LocalStackGuide.md) for details.\n\n## Technology Stack\n\n- **Language:** TypeScript\n- **Platform:** AWS Lambda\n- **Runtime:** Node.js 24+ (see .nvmrc)\n- **Package Manager:** npm\n- **AWS SDK:** v3\n- **Testing:** Jest\n- **Linting/Formatting:** ESLint + Prettier\n- **Validation:** Zod\n- **Logging:** Pino + Pino Lambda\n- **Infrastructure:** AWS CDK\n- **DevOps:** GitHub Actions\n\n## Key Dependencies\n\n### Runtime Dependencies\n\n- **[@aws-sdk/client-dynamodb](https://www.npmjs.com/package/@aws-sdk/client-dynamodb)** - AWS SDK v3 DynamoDB client\n- **[@aws-sdk/client-sns](https://www.npmjs.com/package/@aws-sdk/client-sns)** - AWS SDK v3 SNS client\n- **[@aws-sdk/lib-dynamodb](https://www.npmjs.com/package/@aws-sdk/lib-dynamodb)** - DynamoDB document client utilities\n- **[zod](https://www.npmjs.com/package/zod)** - TypeScript-first schema validation\n- **[pino](https://getpino.io/)** - Low overhead, fast logger for JavaScript\n\n### Development Dependencies\n\n- **[@types/aws-lambda](https://www.npmjs.com/package/@types/aws-lambda)** - TypeScript definitions for AWS Lambda\n- **[jest](https://www.npmjs.com/package/jest)** - Testing framework\n- **[eslint](https://www.npmjs.com/package/eslint)** - Linting utility\n- **[prettier](https://www.npmjs.com/package/prettier)** - Code formatter\n\n## Environments\n\nThe project supports multiple environments:\n\n- **dev** - Development environment\n- **qat** - Quality Assurance/Testing environment\n- **prd** - Production environment\n\nEach environment has its own AWS account and configuration.\n\n## Lambda Utils Project\n\nThe `@leanstacks/lambda-utils` package is a TypeScript utility library for AWS Lambda functions. It provides pre-configured logging, API response formatting, configuration validation, and AWS SDK clients—reducing boilerplate and promoting best practices within Node.js Lambda functions.\n\nSeveral of the Lambda Utils are used in the Lambda Starter application. You are encouraged to use the Lambda Utils library in your project or, if you want to maintain the source code yourself, you may fork the repo or copy only the code you need into your project.\n\nLearn more about the Lambda Utils with these resources...\n\n- **[@leanstacks/lambda-utils package on NPM](https://www.npmjs.com/package/@leanstacks/lambda-utils)**\n- **[lambda-utils repository on GitHub](https://github.com/leanstacks/lambda-utils)**\n\n## Serverless Microservice Patterns\n\nThis project implements the **Simple Web Service** serverless microservice pattern. The [Serverless Microservice Patterns repository](https://github.com/leanstacks/serverless-microservice-patterns) provides a comprehensive collection of additional patterns and examples, including:\n\n- **Simple Web Service**: A basic serverless web service pattern using API Gateway, Lambda, and DynamoDB.\n- **Gatekeeper**: Adds an Auth microservice to authenticate and authorize API requests.\n- **Internal API**: Facilitates synchronous, internal microservice-to-microservice integration without API Gateway exposure.\n- **Internal Handoff**: Enables asynchronous microservice-to-microservice communication.\n- **Publish Subscribe**: Demonstrates event-driven architecture using SNS topics and SQS queues for loose coupling.\n- **Queue-Based Load Leveling**: Uses a message queue as a buffer to decouple producers from consumers and smooth demand spikes.\n\nEach pattern is implemented as a standalone project with practical examples and reference implementations for building scalable, event-driven microservices on AWS.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Further Reading\n\n- [**Lambda Utils Project**](https://github.com/leanstacks/lambda-utils)\n- [**Project Documentation**](./docs/README.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleanstacks%2Flambda-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleanstacks%2Flambda-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleanstacks%2Flambda-starter/lists"}