Skip to content
v2.273.0

SnsDlq Class ​

An SNS dead letter queue destination configuration for a Lambda event source.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_lambda_event_sources as lambda_event_sources } from 'aws-cdk-lib';
import { aws_sns as sns } from 'aws-cdk-lib';

declare const topic: sns.Topic;
const snsDlq = new lambda_event_sources.SnsDlq(topic);
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_lambda_event_sources as lambda_event_sources
from aws_cdk import aws_sns as sns

# topic: sns.Topic

sns_dlq = lambda_event_sources.SnsDlq(topic)
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.lambda.eventsources.*;
import software.amazon.awscdk.services.sns.*;

Topic topic;

SnsDlq snsDlq = new SnsDlq(topic);
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.Lambda.EventSources;
using Amazon.CDK.AWS.SNS;

Topic topic;

var snsDlq = new SnsDlq(topic);
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"
import "github.com/aws/aws-cdk-go/awscdk"

var topic Topic

snsDlq := awscdk.Aws_lambda_event_sources.NewSnsDlq(topic)

Initializer ​

ts
new SnsDlq(topic: ITopic)
python
SnsDlq(topic: ITopic)
java
new SnsDlq(ITopic topic)
csharp
new SnsDlq(ITopic topic)
go
NewSnsDlq(Topic ITopic)

Methods ​

bind(_target: IEventSourceMapping, targetHandler: IFunction): DlqDestinationConfigdef bind(self, _target: IEventSourceMapping, target_handler: IFunction) -> DlqDestinationConfigpublic DlqDestinationConfig bind(IEventSourceMapping _target, IFunction targetHandler)public DlqDestinationConfig Bind(IEventSourceMapping _target, IFunction targetHandler)func Bind(_target IEventSourceMapping, TargetHandler IFunction) DlqDestinationConfig#
Returns a destination configuration for the DLQ.