Aws-cdk: SQS - Unknown Attribute FifoQueue when setting fifo to false in Queue Props

Created on 15 Jun 2020  路  3Comments  路  Source: aws/aws-cdk

Setting fifo to false in QueueProps when creating an SQS queue causes the deploy to fail.

Reproduction Steps

This is the code used to create the queue. It is part of a reusable component, I have made a workaround of only setting the fifo prop if it is set to true and everything works as expected.

return new sqs.Queue(stack, name, {
      encryption: encrypted ? sqs.QueueEncryption.KMS_MANAGED : sqs.QueueEncryption.UNENCRYPTED,
      fifo,
      queueName: name,
      retentionPeriod,
      visibilityTimeout
    });

Error Log

This error shows up under CloudFormation events as the reason why creating the queue failed.
Unknown Attribute FifoQueue. (Service: AmazonSQS; Status Code: 400; Error Code: InvalidAttributeName; Request ID: )

Environment

  • CLI Version : 1.45.0
  • Framework Version: 1.45.0
  • Node.js Version: v14.3.0
  • OS : macOS Catalina v10.15.15
  • Language (Version): TypeScript (^3.9.5)

Other

I found a similar issue report here: AWS PHP SDK Github issue


This is :bug: Bug Report

@aws-cdaws-sqs bug efforsmall p2

Most helpful comment

Hey there. Looks like this is a known issue with cloudformation. They have an issue in their roadmap for it.

We can potentially perform some logic inside of the construct to pass undefined to the L1 when the user passes false to cover this from our side. I can't imagine that causing any conflicts in the future. @eladb opinions on diverging from CFN here to prevent this error? Should be non-breaking as far as I can tell.

That is exactly what you're workaround is doing but one level higher. Anyone else encountering this can do that as well in the meantime.

All 3 comments

Hey there. Looks like this is a known issue with cloudformation. They have an issue in their roadmap for it.

We can potentially perform some logic inside of the construct to pass undefined to the L1 when the user passes false to cover this from our side. I can't imagine that causing any conflicts in the future. @eladb opinions on diverging from CFN here to prevent this error? Should be non-breaking as far as I can tell.

That is exactly what you're workaround is doing but one level higher. Anyone else encountering this can do that as well in the meantime.

I've just bumped into this issue as well.

It would make a lot of sense to reflect this in the docs.
Currently docs for interface QueueProps reads: fifo? | boolean.
Would be better to make it some enum like true or undefined.

experience same

Was this page helpful?
0 / 5 - 0 ratings