I'm trying to filter based on metadata values of incoming SQS events, not what is in their body.
From the documentation, it is mentioned that there is a messageAttributes attribute. I want to filter based on what is inside that value. However, I can't get it to work. I've even tried something like the following to test filtering on metadata:
[
{
"Pattern": "{\"MessageId\":[{\"anything-but\":[\"Raining\"]}]}"
}
]
Which should always match.
Something to note is that the documentation uses camelCase for the attribute names, but when I pull a message using the cli, I see the attribute in PascalCase. I've tried both variants and still don't get a match.
Is it possible to match based on what is inside messageAttributes? Is there an easier way to debug the filter expression?
Thanks!