Posted On: Apr 26, 2021

HAQM Simple Notification Service (HAQM SNS) message filtering lets you simplify your pub/sub messaging architecture by offloading message filtering logic from your subscriber systems as well as message routing logic from your publisher systems. HAQM SNS message filtering offers a set of matching operators, which enables you to filter messages based on their attribute keys or attribute values.

HAQM SNS is introducing the following matching operators:

  • [{"exists": false}] - Use this operator to deliver only the messages that don't carry the specified attribute key. For more information, see Attribute key matching in the HAQM SNS Developer Guide.
  • [{"anything-but": {"prefix":"..."}}] - Use this operator to deliver only the messages that carry an attribute with the specified key and whose string value doesn't start with the given prefix. For more information, see Using a prefix with the anything-but operator in the HAQM SNS Developer Guide.
  • [{"cidr": "..."}] - Use this operator to deliver only the messages that carry an attribute with the specified key and whose string value matches IP addresses in the provided network. This operator follows to the Classless Inter-Domain Routing (CIDR) notation. For more information, see IP address matching in the HAQM SNS Developer Guide.

With HAQM SNS, you can use message filtering operators for application-to-application (A2A) and application-to-person (A2P) communication workloads. For more information, see Message filtering and Subscription filter policies in the HAQM SNS Developer Guide.