How SNS Filter Policies Silently Drop Messages Without Any Error Signal
AWS Simple Notification Service (SNS) can silently discard published messages when a subscription's filter policy requires specific message attributes that the publisher omits. Despite the publish call returning a successful MessageId, the message is never delivered to the filtered subscription and no exception, retry, or dead-letter queue entry is triggered. The only indicator is a CloudWatch metric called NumberOfNotificationsFilteredOut, which typically goes unmonitored until a production incident surfaces the problem. Unit tests cannot catch this gap because mocked SNS clients have no awareness of the subscription's filter policy, which lives in AWS account configuration rather than source code. AI coding assistants are equally blind to the issue, as filter policies are not stored in the repository and the assistants simply replicate existing publish patterns, potentially propagating the missing attributes.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in