Matthew McMahon
Matthew McMahon

Reputation: 53

SNS Subscription Filter Policies do not seem to work when a Binary Message Attribute present

I am having a strange problem.

My SNS -> SQS subscription with filter policy (anything-but) has been working fine.

However when I added a new attribute, initially as a String (JSON Object stringified) things stopped working, and seemed due to this new attribute as if I remove it, things work again. From what I can see in the Cloudwatch Metrics it is due to NumberOfNotificationsFilteredOut-InvalidAttributes.

I tried to change it to send as a Binary type, but the same problem, the filtering again fails on NumberOfNotificationsFilteredOut-InvalidAttributes.

I seemed to be able to work around it, by Base64 encoding the value myself and sending as a String type.

What might be happening here? From what I understand, a filter policy should ignore attributes it doesn't care about, and always ignore binary attributes. However this doesn't seem to be my experience.

Upvotes: 3

Views: 2310

Answers (1)

Amjad Tubasi
Amjad Tubasi

Reputation: 382

Amazon SNS ignores message attributes with the Binary data type.

Upvotes: -1

Related Questions