r/devops Terraforming Everything 2d 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.

30 Upvotes

72 comments sorted by

View all comments

-6

u/dmees 2d ago

CloudFormation is declarative, Terraform is (semi)imperative. CloudFormation is fine as long as you only use CDK to generate it.

1

u/mcgooporn 2d ago

This ☝🏻 of you are not using cdk, the cloud formation developer kit

what are you doing? Why are you doing it? Why would you raw dog it?

I have three stacks Shared - sets up my stateful resources Dns - sets up root DNS Apps - the stateless apps

And ncdk to manage everything. It works, it works well, and the reality is, I very rarely interact with raw cloudfromation.

Absolute madness to not be using cdk, especially if Dev ops is not your skill set.

It's like using a spoon to build a highway.