Large number of SNS topics overwhelms lambda resource-based policy quota

I have about 100 of SNS topics lambda should subscribe to. This looks like an ordinary situation, but the serverless produces a resource-based policy that is way bigger (twice as much or so, I think) than Lambda Quota (20KB Lambda quotas - AWS Lambda)

What is the usual solution for such a problem?

I have checked some AWS documentation regarding the issue, and most of the time it advises fixing that after deployment, like minimizing the permissions, which is not possible using serverless/Cloudformation as the stack is reverted and deployment is failed because of the quota.

Closing this as the only way to bypass the limitation is to generate resource-based permissions and subscriptions via templating. Just via jinja2 template and that’s it.