I've created an SNS topic, and I'd like to subscribe to it with a filter policy that matches a nested attribute. For example, given a message like this:
{
"foo": {
"bar": "baz"
},
"quux": "vorp"
}
I'd like to match only messages where the bar
attribute of foo
is equal to baz
.
The documentation I've found so far only mentions matching attributes specified at the top level. I'm interested in a nested attribute. For the purposes of this question, let's assume I don't control the structure of the message.
Subscription filters don't act on the message (body, payload). They only act on the message attributes.
Message attributes are not complex objects... their only types are string, string array, number, and binary. If a message attribute contains a serialized object (e.g. JSON), subscription filters aren't designed to support extracting/matching the serialized data inside.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With