LambdaSubscription

class aws_cdk.aws_sns_subscriptions.LambdaSubscription(fn, *, dead_letter_queue=None, filter_policy=None)

Bases: object

Use a Lambda function as a subscription target.

Parameters
  • fn (IFunction) –

  • dead_letter_queue (Optional[IQueue]) – Queue to be used as dead letter queue. If not passed no dead letter queue is enabled. Default: - No dead letter queue enabled.

  • filter_policy (Optional[Mapping[str, SubscriptionFilter]]) – The filter policy. Default: - all messages are delivered

Methods

bind(topic)

Returns a configuration for a Lambda function to subscribe to an SNS topic.

Parameters

topic (ITopic) –

Return type

TopicSubscriptionConfig