SNS Subscription with FIlter

I would like to subscribe a lambda to an existing Topic, but I don’t want to trigger my lambda on all messages. I know how to apply filter to subscription by AWS Console, but I have no idea how to deploy it by serverless.
Can anyone help me with that?


@maciek.miekus SNS subscription filter policies are only new to AWS. It’s going to take a while before they’re supported by Serverless. Given that they don’t seem to be supported by CloudFormation it may be a longer wait than usual.

Thanks @buggy for the prompt response, I will try to solve it with AWS CLI.

Is there already an issue open for this so that I can see when you guys are able to implement this?

1 Like

There’s now a plugin for that!



It’s been over a year, sorry for bringing this back from the dead but is there any existing support for this? Alternatively, a link to a tracking issue or an example Resource config would be great.



This feature seems to be available but does not work.
I created a stackoverflow question… crickets.

I was able to get the SNS filter policy to work. I responded to @anwarhamr in StackOverflow.