https://serverless-stack.com/ logo
#sst
Title
# sst
r

Ross Coundon

11/24/2021, 2:41 PM
I'm defining an SQS queue and looking to set the Redrive Policy but can't find it as an option on the Queue construct or as a member of the sqsQueue property. However, if I import the CDK CfnQueue type directly, it's there. Am I right in thinking the
Queue.sqsQueue
property should expose the same properties as are available when doing
new CfnQueue() ?
t

thdxr

11/24/2021, 2:42 PM
CfnQueue is one layer below AWS CDK queue
Let me dig a bit
r

Ross Coundon

11/24/2021, 2:43 PM
I see, cheers
t

thdxr

11/24/2021, 2:44 PM
CDK queue has this code in it
Copy code
const redrivePolicy = props.deadLetterQueue
      ? {
        deadLetterTargetArn: props.deadLetterQueue.queue.queueArn,
        maxReceiveCount: props.deadLetterQueue.maxReceiveCount,
      }
      : undefined;
r

Ross Coundon

11/24/2021, 2:45 PM
ah, I see
t

thdxr

11/24/2021, 2:45 PM
Is maxReceiveCount what you're trying to change?
r

Ross Coundon

11/24/2021, 2:45 PM
Yes
t

thdxr

11/24/2021, 2:45 PM
ah cool then you should be able to change it with sqsQueue.deadLetterQueue.maxReceiveCount
r

Ross Coundon

11/24/2021, 2:46 PM
Perfect, thanks for digging