aws_lambda_nodejs: default bundling option never bundle AWS SDK #32623
Labels
@aws-cdk/aws-lambda-nodejs
documentation
This is a problem with documentation.
needs-triage
This issue or PR still needs to be triaged.
Describe the issue
If deploy a NodejsFunction with code like the one below, the AWS SDK specified in package.json will not be bundled in the assets.
As a result, our application will use the AWS SDK built into the Lambda execution environment by default.
The Lambda documentation states the following and recommends including the AWS SDK in your deployment package.
https://docs.aws.amazon.com/lambda/latest/dg/nodejs-handler.html#nodejs-best-practices
The default bundling options may break AWS SDK compatibility, so I think the CDK documentation should also clearly warn about this.
Links
https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda_nodejs.BundlingOptions.html
The text was updated successfully, but these errors were encountered: