Skip to content
v2.275.0

EventBridgeDestination Class ​

Use an Event Bridge event bus as a Lambda destination.

If no event bus is specified, the default event bus is used.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_events as events } from 'aws-cdk-lib';
import { aws_lambda_destinations as lambda_destinations } from 'aws-cdk-lib';

declare const eventBus: events.EventBus;
const eventBridgeDestination = new lambda_destinations.EventBridgeDestination(/* all optional props */ eventBus);
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_events as events
from aws_cdk import aws_lambda_destinations as lambda_destinations

# event_bus: events.EventBus

event_bridge_destination = lambda_destinations.EventBridgeDestination(event_bus)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.events.*;
import software.amazon.awscdk.services.lambda.destinations.*;

EventBus eventBus;

EventBridgeDestination eventBridgeDestination = new EventBridgeDestination(eventBus);
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Events;
using Amazon.CDK.AWS.Lambda.Destinations;

EventBus eventBus;

var eventBridgeDestination = new EventBridgeDestination(eventBus);
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var eventBus EventBus

eventBridgeDestination := awscdk.Aws_lambda_destinations.NewEventBridgeDestination(eventBus)

Initializer ​

ts
new EventBridgeDestination(eventBus?: IEventBus)
python
EventBridgeDestination(event_bus: typing.Optional[IEventBus] = None)
java
new EventBridgeDestination(IEventBus eventBus)
csharp
new EventBridgeDestination(IEventBus? eventBus = null)
go
NewEventBridgeDestination(EventBus IEventBus)

Methods ​

bind(_scope: Construct, fn: IFunction, _options?: DestinationOptions): DestinationConfigdef bind(self, _scope: Construct, fn: IFunction, _options: typing.Optional[DestinationOptions] = None) -> DestinationConfigpublic DestinationConfig bind(Construct _scope, IFunction fn, DestinationOptions _options)public DestinationConfig Bind(Construct _scope, IFunction fn, DestinationOptions? _options = null)func Bind(_scope Construct, Fn IFunction, _options DestinationOptions) DestinationConfig#
Returns a destination configuration.