amazon-web-servicesamazon-sqsamazon-snsfifo

AWS FIFO queues subscription with SNS: passing message group id


In my application all the microservices are currently communicating via AWS FIFO queues.

I am currently trying to make all those queues subscribing an SNS topic with some filtering condition.

In the recent past (until March) the AWS documentation used to mention some compatibility issue with SNS. However, today this mention has been removed from the doc:

https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html#FIFO-compatibility

My question is how to set up my SNS to pass one SNS message attribute as FIFO SQS message group id.

Do you have any clue/hint?

Thanks

Update:

As I mentioned in the original question, FIFO queues SNS subscription has been recently supported according to the doc (see above) and to the FAQ (see below):

Q: With which AWS or external services are Amazon SQS FIFO queues compatible?

Some AWS or external services that send notifications to Amazon SQS might not be compatible with FIFO queues, despite allowing you to set a FIFO queue as a target.

The following features of AWS services aren't currently compatible with FIFO queues:

Auto Scaling Lifecycle Hooks AWS IoT Rule Actions AWS Lambda Dead Letter Queues

For information about compatibility of other services with FIFO queues, see your service documentation.

https://aws.amazon.com/sqs/faqs/?nc1=f_ls

If you just Google it, you will find several articles and forum claiming that this did not work until ~6 months ago.


Solution

  • Note: This answer is now outdated.

    According to the AWS article Tutorial: Subscribing an Amazon SQS Queue to an Amazon SNS Topic see the following:

    Note:

    Amazon SNS isn't currently compatible with FIFO queues.

    Also see the AWS Forum post FIFO queue subscribes to a SNS topic.