question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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: <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 Report

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:15
  • Comments:13 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
MrArnoldPalmercommented, Jun 17, 2020

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.

1reaction
ParallelPlatypuscommented, Feb 24, 2021

bump - same issue, in python 3.7 using:

 self._queue=sqs.Queue(
            scope, 
            QUEUE_ID_PREFIX + name, 
            fifo=True if FIFO_ENABLED else None,
            removal_policy=REMOVAL_POLICY
        )

fixed this for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot create a FIFO SQS through CLI
Designates a queue as FIFO. Valid values: true, false. If you don't specify the FifoQueue attribute, Amazon SQS creates a standard queue.
Read more >
SetQueueAttributes - Amazon Simple Queue Service
Sets the value of one or more queue attributes. When you change a queue's attributes, the change can take up to 60 seconds...
Read more >
@aws-cdk/aws-sqs | Yarn - Package Manager
Amazon Simple Queue Service (SQS) is a fully managed message queuing service that enables you to decouple and scale microservices, distributed systems, ...
Read more >
Interesado ka ba sa mga Tweet ni @YAmaguchixt?
SQS - Unknown Attribute FifoQueue when setting fifo to false in Queue Props · Issue #8550 ·... Setting fifo to false in QueueProps...
Read more >
CreateQueue - Amazon Simple Queue Service
FifoQueue – Designates a queue as FIFO. Valid values are true and false . If you don't specify the FifoQueue attribute, Amazon SQS...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found