SNS filter policy for existence of message attributes not working with 0 message attributes

Viewed 459

A SNS subscription for a SQS queue has a filter policy: {"store": [{"exists": false}]}

It's designed to accept all messages that do not have message attribute store.

When publish a message with no message attributes to the SNS topic, the message will not be received by the SQS queue. It doesn't work as expected since this message doesn't have message attribute store and it should meet the filter policy.

But the SQS queue can receive a message that has at least one message attribute other than store.

It seems that the feature in the SNS subscription filter policy for checking existence of a message attribute only works if the message has at least one message attribute.

0 Answers
Related