Lambda -> EventBridge
π₯ Import
import * as lambda from 'aws-cdk-lib/aws-lambda';
import * as destinations from 'aws-cdk-lib/aws-lambda-destinations';
import * as events from '@aws-cdk/aws-events';
π₯ Code
declare const myFunction: lambda.Function;
declare const myEventBus: events.EventBus;
myFunction.addEventSource(new destinations.EventBridgeDestination(myEventBus));
Last updated