Add filter policy to SNS subscription
Filtering SNS messages require setting a filter policy on top of the subscription's connection.
Add filter policy to SNS subscription
- Click on the SNS's sourced connection you wish to add the filter policy.
- Set
Property
,Type
,Operator
andValue
of the filter policy rule. - Click SAVE to finish editing the connection.
This will create a filter policy on top of the SNS subscription. The filter policy applies to the SNS's message attribute
MessageAttribute
. Check out AWS docs for further reading.
Constraints
- Supports up to 5 filters
String
type supports only string values,Number
type supports only numeric values- Supports up to 150 combinations between the filters, for example, the following filter policy:
The first key has a single value, the second has three values, and the third has two values. The total combination is calculated as follows:
1 * 3 * 2 = 6
Acceptable formats
Some operators support a comma-separated list of values, as detailed below.
String
type
=
,!=
,In
,Not In
- support comma-separated string values.Starts With
- supports a single prefix string value.Exists
- doesn't require any value.
Number
type
=
,Not In
- support comma-separated number values.>
,>=
,<
,<=
- support a single number value.Between
- supports two number values that represent the range of possible values.Exists
- doesn't require any value.