Bundle TypeScript/JavaScript Node.js Lambda handlers into a deployable zip using esbuild. Current version: 1.0.6. Provides CLI commands (`archive`, `upload`) and programmatic API (`build`, `buildAndUpload`). Supports custom entry files, excluding external modules (e.g., layers), and generating esbuild metafiles for bundle analysis. Differentiates from similar tools by focusing solely on Lambda deployment with zero-config defaults and AWS CLI integration. Ships with TypeScript declarations. Lightweight alternative to serverless-webpack or AWS SAM.
npm install lambda-buildNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows programmatic usage: bundle a TypeScript Lambda handler and create a zip archive with metafile.
Ensure AWS CLI is set up via `aws configure` before using `upload`.
Verify that excluded dependencies are present as layers or included in the Lambda runtime.
None.
Update to use esbuild options; see documentation for changes.
Install esbuild as a dev dependency: `npm i -D esbuild`
Either add 'aws-sdk' to external array only if you have it in a layer, or bundle it by removing it from external.
Pass an `entry` option pointing to your handler file, e.g., `entry: 'src/handler.ts'`.
Use `-e` to specify a custom entry file, or create a default index file.
No dependency data recorded yet.