In this section, you will directly observe the JSON syntax of the numeric comparison filter policy (Numeric Filter Policy) configured on Amazon SNS for the VIPExpressQueue queue. Next, you will act as a customer placing a high-volume bulk order (quantity >= 5) on The Cozy Brew web interface to activate this filter policy.
In our CloudFormation template, a numeric comparison filter policy was attached to the VIPExpressQueue subscription. Let’s inspect it in the console:
VIPExpressQueue.
{
"quantity": [
{
"numeric": [ ">=", 5 ]
}
]
}

Numeric Matching in SNS:
Amazon SNS supports numeric comparison operators including =, >, >=, <, <=, and range conditions [ “between”, min, max ]. In the example above, any message carrying a quantity attribute whose value is greater than or equal to 5 will satisfy the condition and be forwarded.
Now let’s place a high-volume order from The Cozy Brew web interface to activate this filter:
5 (or higher).quantity >= 5 condition and will be automatically routed by SNS directly to VIPExpressQueue!”
Enter customer name under Customer Name (e.g., Tech Office Catering) and click Place Order & Publish Event.
Observe the visual feedback on the interface:
BaristaQueue and VIPExpressQueue queue branches light up concurrently.
