Removing a subscription filter policy
To stop filtering the messages that are sent to a subscription, remove the subscription's filter policy by overwriting it with an empty JSON body. After you remove the policy, the subscription accepts every message that's published to it.
Amazon Web Services Management Console
Sign in to the Amazon SNS console
. -
On the navigation panel, choose Subscriptions.
-
Select a subscription and then choose Edit.
-
On the Edit
EXAMPLE1-23bc-4567-d890-ef12g3hij456
page, expand the Subscription filter policy section. -
In the JSON editor field, provide an empty JSON body for your filter policy:
{}
. -
Choose Save changes.
Amazon SNS applies your filter policy to the subscription.
Amazon CLI
To remove a filter policy with the Amazon CLI, use the set-subscription-attributes
command and provide an empty
JSON body for the --attribute-value
argument:
$
aws sns set-subscription-attributes --subscription-arn
arn:aws-cn:sns: ...
--attribute-name FilterPolicy --attribute-value "{}"
Amazon SNS API
To remove a filter policy with the Amazon SNS API, make a request to the SetSubscriptionAttributes
action. Set the
AttributeName
parameter to FilterPolicy
, and provide an
empty JSON body for the AttributeValue
parameter.