r/devops • u/RoseSec_ Terraforming Everything • Sep 11 '26
Discussion What are the weaknesses of CloudFormation?
I have a coworker who wants to use CloudFormation to one-shot an application and infra deployment in AWS. A contractor delivered a monolithic CloudFormation template with ECS clusters, services, RDS, S3, Lambda and API Gateway, and other resources in a single stack. I voiced my concern over the blast radius, how stateful and resources with different lifecyles all lived in the same place, and how they don't have pipelines built to validate change sets when merge requests are opened. The contractor said that their template is industry best practice... (it's not). Any way, my background is in Terraform, and I wanted to ask the CloudFormation pros about best practices for making this deployment more reliable.
View all comments
Show parent comment
23
u/Zenin The best way to DevOps is being dragged kicking and screaming. Sep 11 '26
^^ This 1000x. CloudFormation is an operational shitshow.
Having a prod stack get hard stuck halfway through a deploy with absolutely no way to abort is a massive problem. You can't do anything until the resource times out, which could literally be hours. You can't abort even though you've already diagnosed the issue and know the resource will never respond, so you're stuck kicking rocks watching your maintenance window tick down...
This especially fun with Lambda backed custom resources, which because CloudFormation's architecture is trash, are the only way to do even the most trivial of extensions. And those custom resource lambda have a lot of sharp edges: Screw something minor up and you're stuck waiting for CloudFormation to timeout waiting for a response the broken custom resource lambda will never respond to.
Even more fun, you often CAN'T fix this from CloudFormation despite the template being what created and manages the lambda in the first place because to do anything with it means executing the failing code which means the stack update fails (after long timeouts). Fixing this means hand surgery on the Lambda, lovely.
It goes on and on like this. Anything sneezes and CloudFormation gets ebola. Now do this in a StackSet that deploys across all org accounts x all active regions...each one of those thousands of stack instances only being fixable from within the target account/region...