Package Exports
- @aws-cdk/aws-lambda-destinations
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@aws-cdk/aws-lambda-destinations) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Amazon Lambda Destinations Library
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:
import lambda = require('@aws-cdk/aws-lambda');
import destinations = require('@aws-cdk/aws-lambda-destinations');
import sns = require('@aws-cdk/aws-sns');
const myTopic = new sns.Topic(this, 'Topic');
const myFn = new lambda.Function(this, 'Fn', {
// other props
onSuccess: new destinations.SnsDestionation(myTopic)
})
See also Configuring Destinations for Asynchronous Invocation.