DeadLetterQueue - Amazon Serverless Application Model
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

DeadLetterQueue

Specifies an SQS queue or SNS topic that Amazon Lambda (Lambda) sends events to when it can't process them. For more information about dead letter queue functionality, see Dead-letter queues in the Amazon Lambda Developer Guide.

SAM will automatically add appropriate permission to your Lambda function execution role to give Lambda service access to the resource. sqs:SendMessage will be added for SQS queues and sns:Publish for SNS topics.

Syntax

To declare this entity in your Amazon Serverless Application Model (Amazon SAM) template, use the following syntax.

YAML

TargetArn: String Type: String

Properties

TargetArn

The Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic.

Type: String

Required: Yes

Amazon CloudFormation compatibility: This property is passed directly to the TargetArn property of the AWS::Lambda::Function DeadLetterConfig data type.

Type

The type of dead letter queue.

Valid values: SNS, SQS

Type: String

Required: Yes

Amazon CloudFormation compatibility: This property is unique to Amazon SAM and doesn't have an Amazon CloudFormation equivalent.

Examples

DeadLetterQueue

Dead Letter Queue example for an SNS topic.

YAML

DeadLetterQueue: Type: SNS TargetArn: arn:aws:sns:us-east-2:123456789012:my-topic