Serverless functions without a dead-letter queue (DLQ) can lose events from failed asynchronous invocations and make failure diagnosis and recovery difficult. For AWS::Serverless::Function resources, the DeadLetterConfig property must be defined and not null. The DeadLetterConfig should include a valid TargetArn that points to a durable target such as an Amazon SQS queue or an Amazon SNS topic; resources missing DeadLetterConfig or with it set to null will be flagged.
AWSTemplateFormatVersion:'2010-09-09'Transform:AWS::Serverless-2016-10-31Description:AWS SAM template with a simple API definitionResources:Function1:Type:AWS::Serverless::FunctionProperties:PackageType:ImageImageUri:account-id.dkr.ecr.region.amazonaws.com/ecr-repo-name:image-nameImageConfig:Command:- "app.lambda_handler"EntryPoint:- "entrypoint1"WorkingDirectory:"workDir"Tags:- Key:TypeValue:AWS Serverless FunctionDeadLetterConfig:TargetArn:arn:aws:sqs:us-east-1:2324243535:aaaType:SQS
Non-Compliant Code Examples
AWSTemplateFormatVersion:'2010-09-09'Transform:AWS::Serverless-2016-10-31Description:AWS SAM template with a simple API definitionResources:Function:Type:AWS::Serverless::FunctionProperties:PackageType:ImageImageUri:account-id.dkr.ecr.region.amazonaws.com/ecr-repo-name:image-nameImageConfig:Command:- "app.lambda_handler"EntryPoint:- "entrypoint1"WorkingDirectory:"workDir"Tags:- Key:TypeValue:AWS Serverless Function
1
2
rulesets:- CloudFormation / AWS # Rules to enforce / AWS.
個別デモのリクエスト
Datadogを開始
Ask AI
AI-generated responses may be inaccurate. Verify important info.