What is the recommended way to run a setup-lambda, after deployng all resources?



I have some AWS Lambdas which are triggered by SNS topics, and want subscriptions to be filtered by a FilterPolicy attribute (unsupported in cloudformation) - therefore, I’ve written a lambda that loads the subscriptions and sets the appropriate FilterPolicy.

What is the recommended way to run this lambda, after deploying all resources?

Should I write a plugin and hook into after:deploy:deploy? Or can it be done by just configuration?

I’d like to feed that lambda with the list of desired topic and lambda names, and defined filter rules, so the lambda knows which rules to set up on which topic subscriptions. - And to make it configurable directly from the YML template.

Thanks in advance for your help :slight_smile: