Lambda function without dead-letter queue 이 페이지는 아직 한국어로 제공되지 않습니다. 번역 작업 중입니다.
현재 번역 프로젝트에 대한 질문이나 피드백이 있으신 경우
언제든지 연락주시기 바랍니다. Id: cloudformation-aws-lambda-function-without-dead-letter-queue
Provider: AWS
Platform: CloudFormation
Severity: Low
Category: Insecure Configurations
Learn More Description Lambda functions should be configured with a dead-letter queue (DLQ) to capture failed asynchronous invocations and prevent message loss or silent failures. In AWS CloudFormation, AWS::Lambda::Function resources should define Properties.DeadLetterConfig.TargetArn and set it to a valid destination ARN (typically an Amazon SQS queue or Amazon SNS topic). Resources missing DeadLetterConfig or where DeadLetterConfig.TargetArn is undefined or null will be flagged.
Secure configuration example (CloudFormation YAML):
MyDLQ :
Type : AWS::SQS::Queue
Properties :
QueueName : my-dlq
MyFunction :
Type : AWS::Lambda::Function
Properties :
FunctionName : my-function
Runtime : nodejs14.x
Handler : index.handler
Role : arn:aws:iam::123456789012:role/lambda-role
DeadLetterConfig :
TargetArn : !GetAtt MyDLQ.Arn
Compliant Code Examples AWSTemplateFormatVersion : '2010-09-09'
Description : VPC function.
Resources :
Function3 :
Type : AWS::Lambda::Function
Properties :
Handler : index.handler
Role : arn:aws:iam::123456789012:role/lambda-role
Code :
S3Bucket : my-bucket
S3Key : function.zip
Runtime : nodejs12.x
Timeout : 5
TracingConfig :
Mode : Active
VpcConfig :
SecurityGroupIds :
- sg-085912345678492fb
SubnetIds :
- subnet-071f712345678e7c8
- subnet-07fd123456788a036
Tags :
- Key : Description
Value : VPC Function
- Key : Type
Value : AWS Lambda Function
DeadLetterConfig :
TargetArn : arn:aws:sqs:us-east-1:2324243535:aaa
Non-Compliant Code Examples AWSTemplateFormatVersion : '2010-09-09'
Description : VPC function.
Resources :
Function :
Type : AWS::Lambda::Function
Properties :
Handler : index.handler
Role : arn:aws:iam::123456789012:role/lambda-role
Code :
S3Bucket : my-bucket
S3Key : function.zip
Runtime : nodejs12.x
Timeout : 5
TracingConfig :
Mode : Active
VpcConfig :
SecurityGroupIds :
- sg-085912345678492fb
SubnetIds :
- subnet-071f712345678e7c8
- subnet-07fd123456788a036
Tags :
- Key : Description
Value : VPC Function
- Key : Type
Value : AWS Lambda Function
AWSTemplateFormatVersion : '2010-09-09'
Description : VPC function.
Resources :
Function2 :
Type : AWS::Lambda::Function
Properties :
Handler : index.handler
Role : arn:aws:iam::123456789012:role/lambda-role
Code :
S3Bucket : my-bucket
S3Key : function.zip
Runtime : nodejs12.x
Timeout : 5
TracingConfig :
Mode : Active
VpcConfig :
SecurityGroupIds :
- sg-085912345678492fb
SubnetIds :
- subnet-071f712345678e7c8
- subnet-07fd123456788a036
Tags :
- Key : Description
Value : VPC Function
- Key : Type
Value : AWS Lambda Function
DeadLetterConfig :