You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When setting up a basic SQS and using it as a DLQ for a lambda, I get an error from AwsSolutions that the queue is not used as a DLQ and does not have a DLQ enabled.
Reproduction Steps
import{Queue}from"aws-cdk-lib/aws-sqs"import{Aspects,aws_lambda,StackProps}from"aws-cdk-lib"import{Architecture}from"aws-cdk-lib/aws-lambda"import*ascdkfrom"aws-cdk-lib"import{AwsSolutionsChecks}from"cdk-nag"import{Construct}from"constructs"constapp=newcdk.App()exportclassTestStackextendscdk.Stack{constructor(scope: Construct,id: string,props?: StackProps){super(scope,id)constdlq=newQueue(this,"DLQ")constlambda=newaws_lambda.Function(this,"Function",{handler: "index.handler",// The name of the method within your code that Lambda calls to execute your functioncode: aws_lambda.Code.fromInline(` exports.handler = async (event) => { console.log("Hello, CDK! You've hit", event.path); } `),runtime: aws_lambda.Runtime.NODEJS_20_X,architecture: Architecture.ARM_64,memorySize: 128,deadLetterQueueEnabled: true,deadLetterQueue: dlq})}}newTestStack(app,"TestStack")Aspects.of(app).add(newAwsSolutionsChecks({verbose: true}))
What did you expect to happen?
No AwsSolutions-SQS3 error
What actually happened?
[Error at /TestStack/DLQ/Resource] AwsSolutions-SQS3: The SQS queue is not used as a dead-letter queue (DLQ) and does not have a DLQ enabled. Using a DLQ helps maintain the queue flow and avoid losing data by detecting and mitigating failures and service disruptions on time.
cdk-nag version
2.28.63
Language
Typescript
Other information
No response
The text was updated successfully, but these errors were encountered:
What is the problem?
When setting up a basic SQS and using it as a DLQ for a lambda, I get an error from AwsSolutions that the queue is not used as a DLQ and does not have a DLQ enabled.
Reproduction Steps
What did you expect to happen?
No AwsSolutions-SQS3 error
What actually happened?
cdk-nag version
2.28.63
Language
Typescript
Other information
No response
The text was updated successfully, but these errors were encountered: