AWS CDK Construct for bundling Node.js AWS Lambda functions using esbuild. Version 1.1.6 (latest) supports zero-config bundling with ESNext/TypeScript, automatic package manager detection, and external module support. Unlike @aws-cdk/aws-lambda-nodejs (which uses esbuild internally but with less configurability), this construct exposes full esbuild options and allows overriding the 'exclude' list. Currently in maintenance mode; designed for CDK v1 and lacks native CDK v2 support.
npm install aws-lambda-nodejs-esbuildNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a CDK stack with a Lambda function bundled using esbuild, with minification and external aws-sdk.
For CDK v2, use @aws-cdk/aws-lambda-nodejs built-in bundling or migrate to a CDK v2 compatible construct
Run 'npm install --save-dev esbuild' or 'yarn add --dev esbuild'
Add additional modules to esbuildOptions.external: e.g., external: ['aws-sdk', 'pg-native']
Explicitly set runtime property on NodejsFunction to avoid reliance on default
npm install --save-dev esbuild
npm install --save @aws-cdk/aws-lambda @aws-cdk/core
Add 'entry' to the props: entry: 'src/index.ts'