toLambda
Source:
src/AWS/EventBridge/ToLambda.ts
Routes matching events from an EventBridge bus to a Lambda function.
Creates a Rule targeting the function and a Lambda permission
allowing events.amazonaws.com to invoke it. Usually reached through the
events(...) builder rather than called directly.
Examples
Section titled “Examples”Route Matching Events to a Lambda Function
yield* AWS.EventBridge.events(bus, { source: ["my.app"] }).toLambda(fn);Transform the Event Payload Before Invoking
yield* AWS.EventBridge.events(bus, { source: ["my.app"] }).toLambda(fn, { InputTransformer: { InputPathsMap: { orderId: "$.detail.orderId" }, InputTemplate: '{"orderId": <orderId>}', },});