Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions packages/@aws-cdk/aws-lambda-nodejs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,17 @@ It is possible to run additional commands by specifying the `commandHooks` prop:

```ts
new lambda.NodejsFunction(this, 'my-handler-with-commands', {
commandHooks: {
// Copy a file so that it will be included in the bundled asset
afterBundling(inputDir: string, outputDir: string): string[] {
return [`cp ${inputDir}/my-binary.node ${outputDir}`];
bundling: {
commandHooks: {
// Copy a file so that it will be included in the bundled asset
afterBundling(inputDir: string, outputDir: string): string[] {
return [`cp ${inputDir}/my-binary.node ${outputDir}`];
}
// ...
}
// ...
}

});
```

Expand Down