AWS CloudFormation now supports increased limits on five service quotas (2020-10-22)

AWS CloudFormation now supports increased limits on five service quotas

The maximum size of a template that can be passed in an S3 Object is now 1MB (previously 450KB)

No increase for the request body version then? 51KB is tiny :frowning:

The new per template limits for the maximum number of resources is 500 (previously 200)

Wooh! Finally

Probably to limit the size of the request sent to the API.

I’ll be honest, I actually liked this limit. It really enforced the think small and many projects. All of my coworkers, even when given serverless paradigms, kept building monoliths that would quickly hit that 200 limit.

And it was because they were trying to deploy one monolithic application that should have been 5 different set of services. They’d argue that they’d have common components. I’d argue they should then publish a library.

I legitimately fear that this increase will continue to push people to making monoliths. But at the same time a lambda with an api gw has like 12 different infrastructure components so it is useful.

I actually had the opposite thought.

I tend to deploy collections of related microservices in a single CloudFormation stack. With each microservice there’s usually 5 or more resources (task definition, service, role, policy, service discovery, maybe something for storing data), so 40 microservices and you’re running into the limit. I’ve then found myself looking for which existing service should get an additional task, rather than having to restructure the entire CloudFormation stack to break out microservices.

I guess you could separate each microservice into its own template, but that seems like a lot of extra work with relatively little benefit. I’d still end up with some orchestration system to deploy related systems of microservices, so why not just have use CloudFormation for that purpose, aside from the resource limit?

You definitely make a reasonable counterpoint, I’m going to make a few stipulations but even I’m going to say they start on shaky ground. Really good for thought not show stoppers.

  • When you deploy a stack with multiple unrelated lambda, all lambda will be deployed regardless if they changed (when using SAM, when using raw cloudformation you control this with filename or version)
  • When you separate things out, you start thinking about them as separate systems. And treating them as such with much better SOA practices.

Yep, like I said, shaky.

I should have clarified, I group my Microservice by categorical similarities to cut down on stacks deployed (there’s an account limit on those too lol, 200 raisable to 5000). But I’ve been slowly just getting to a point of one project per Microservice, mostly because I’m starting to automate myself out of a job.

I should note, I’m a dev that does cloudformation. Not ops.

If you split up the project into many services, how do you create the links between them?

If I put everything in one stack, I can just do !Ref MyLambdaFunc. Its that simple.

If you split things up more, you need to use some more complicated system for service discovery.

So this is an interesting question, you are right for cross project communication I use a dynamo table for service discovery.

It’s not terribly complex but it does happen, dynamo, api gw but this is also because I use it to register on prem resources and non cloud remote resources too. Things I may need access to at runtime (ssm wouldn’t do). Otherwise you could use ssm.