Skip to content

Commit

Permalink
added new feature to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jonife committed Mar 5, 2024
1 parent 4c1b157 commit 047800e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions packages/aws-cdk-lib/aws-lambda-nodejs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,16 @@ new nodejs.NodejsFunction(this, 'my-handler', {
},
});
```
Includes AWS SDK in the bundle asset by setting `bundleAwsSDK` to `true`. This will be essentially exclude sdk from the external
module and not be resolved to the Lambda provided sdk.

```ts
new nodejs.NodejsFunction(this, 'my-handler', {
bundling: {
bundleAwsSDK: true,
},
});
```

### Install modules

Expand Down
2 changes: 1 addition & 1 deletion packages/aws-cdk-lib/aws-lambda-nodejs/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ export interface BundlingOptions extends DockerRunOptions {
*
* @default - false
* if `true` the `aws-sdk` will be included in the asset bundle and not be
* resolved to the Lambda provided bundle.
* resolved to the Lambda provided sdk.
*/
readonly bundleAwsSDK?: boolean;

Expand Down

0 comments on commit 047800e

Please sign in to comment.