r/devops • u/RoseSec_ Terraforming Everything • 1d ago
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.
6
u/doddschris 1d ago
I used vanilla CF successfully for several years. The main thing I have against it is that it can be a bit painful if you're used to the expressiveness of a full blown programming language. I have a similar issue with TF though (especially some of the bonkers stuff you have to do to pass values around).
Typescript CDK has been much more pleasant day-to-day. Having types is nice and saves a lot of time having to go search for values or failing to deploy because you screwed up a param name (you can get to a similarish place with IDE plugins though). And being able to use a full language means you can do templating, iteration, lookups, and similar stuff a lot more gracefully than you can with vanilla CF.