Hacker News new | ask | show | jobs
by auslander 2870 days ago
> The limit of 200 resources per stack is easy to hit

Never managed to get even close to that number, doing CF for 5 years :)

1 comments

I'm guessing it's heavily dependent on what you're using it for, what kind of resources are you describing in CFN?

In my case, it's Lambda + API Gateway that's the main culprit. For each endpoint in an API, there's a resource for the lambda itself, and a managed policy, role, log group, subscription filter, API resource, method, lambda permission, model, and additional OPTIONS method for CORS purposes. With a setup like that, you can hit the limit with a moderately-sized API.

or you can utilize exported resources, like the article describes, and append your API endpoints to the "master" API Gateway resource that is not even in the same stack.
Yes, that's the solution we came up with. One stack with lambdas, managed policies, roles, user pool, etc; one stack with the APIGateway::RestApi and some resources and methods, and then another stack with yet more resources and methods. This works, but I don't think it's a great solution. Wouldn't it be preferable to have one stack that encompasses the whole API for one service?
WTF are you developing... good grief. What happened to a simple web app with some stateless rest endpoints?