JSPM

@aws-cdk/aws-lambda-destinations

1.21.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 642
  • Score
    100M100P100Q26230F
  • License Apache-2.0

CDK Destinations Constructs for AWS Lambda

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


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:

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.