Skip to content
v2.278.0

LambdaEventSourceProperty Struct ​

Contains information about an event source for an AWS Lambda function.

The event source defines the topics on which this Lambda function subscribes to receive messages that run the function.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_greengrassv2 as greengrassv2 } from 'aws-cdk-lib';
const lambdaEventSourceProperty: greengrassv2.CfnComponentVersion.LambdaEventSourceProperty = {
  topic: 'topic',
  type: 'type',
};
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_greengrassv2 as greengrassv2

lambda_event_source_property = greengrassv2.CfnComponentVersion.LambdaEventSourceProperty(
    topic="topic",
    type="type"
)
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.greengrassv2.*;

LambdaEventSourceProperty lambdaEventSourceProperty = LambdaEventSourceProperty.builder()
        .topic("topic")
        .type("type")
        .build();
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.GreengrassV2;

var lambdaEventSourceProperty = new LambdaEventSourceProperty {
    Topic = "topic",
    Type = "type"
};
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"

lambdaEventSourceProperty := &LambdaEventSourceProperty{
	Topic: jsii.String("topic"),
	Type: jsii.String("type"),
}

Properties ​

topicoptionalstringtopicoptionalstrtopicoptionalStringTopicoptionalstringTopicoptional*string #
The topic to which to subscribe to receive event messages.
typeoptionalstringtypeoptionalstrtypeoptionalStringTypeoptionalstringTypeoptional*string #
The type of event source. Choose from the following options:.
notes
  • PUB_SUB – Subscribe to local publish/subscribe messages. This event source type doesn't support MQTT wildcards ( + and # ) in the event source topic.
  • IOT_CORE – Subscribe to AWS IoT Core MQTT messages. This event source type supports MQTT wildcards ( + and # ) in the event source topic.