Skip to content

Latest commit

 

History

History
45 lines (31 loc) · 2.19 KB

sam-property-function-deadletterqueue.md

File metadata and controls

45 lines (31 loc) · 2.19 KB

DeadLetterQueue

Specifies an SQS queue or SNS topic that AWS Lambda (Lambda) sends events to when it can't process them. For more information about dead letter queue functionality, see AWS Lambda Function Dead Letter Queues.

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 AWS Serverless Application Model (AWS SAM) template, use the following syntax.

YAML

  [TargetArn](#sam-function-deadletterqueue-targetarn): String
  [Type](#sam-function-deadletterqueue-type): String

Properties

TargetArn The Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic.
Type: String
Required: Yes
AWS CloudFormation compatibility: This property is passed directly to the [TargetArn](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-deadletterconfig.html#cfn-lambda-function-deadletterconfig-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
AWS CloudFormation compatibility: This property is unique to AWS SAM and doesn't have an AWS 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