Skip to main content

CDK Destinations Constructs for AWS Lambda

Project description

Amazon Lambda Destinations Library

---

Stability: Stable


This library provides constructs for adding destinations to a Lambda function. Destinations can be added by specifying the onFailure or onSuccess props when creating a function or alias.

Destinations

The following destinations are supported

  • Lambda function
  • SQS queue
  • SNS topic
  • EventBridge event bus

Example with a SNS topic for sucessful invocations:

# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
import aws_cdk.aws_lambda as lambda
import aws_cdk.aws_lambda_destinations as destinations
import aws_cdk.aws_sns as sns

my_topic = sns.Topic(self, "Topic")

my_fn = lambda.Function(self, "Fn",
    # other props
    on_success=destinations.SnsDestionation(my_topic)
)

See also Configuring Destinations for Asynchronous Invocation.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aws-cdk.aws-lambda-destinations-1.21.1.tar.gz (22.9 kB view hashes)

Uploaded Source

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page