Cloud Formation and FIFO Queues

Greg Orzell
Chaotic Snippets
Published in
1 min readApr 25, 2017

When trying to setup a FIFO queue using Amazon’s Cloud Formation I ran into an interesting bug related to their auto generated names. FIFO queues have a requirement that the queue name end with .fifo . However, the general recommendation in the Cloud Formation documentation is that you don’t specify names for resources in case they ever need to be replaced.

Important

If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.

The bug is that Cloud Formation will not actually generate a “correct” name for the resource, because it will not append the .fifo to the end. As a result you MUST specify a name for a FIFO queue resource or the resource creation will fail when you create the stack.

Amazon has since update the documentation to be a bit more explicit about this, as you can see below.

A name for the queue. To create a FIFO queue, the name of your FIFO queue must end with the .fifo suffix. For more information, see FIFO (First-In-First-Out) Queues in the Amazon Simple Queue Service Developer Guide.

--

--