Member-only story
Use Case: AWS CloudFormation vs AWS CDK
Let’s cut to the chase.
What are they?
AWS CloudFormation (CF) and AWS Cloud Development Kit (CDK) are both Infrastructure as Code (IaC) services. These tools help you manage your AWS resources more effectively.
CF employs a declarative approach, which means you tell it *what* you want, and it figures out the *how*. You write a template, and CF deploys the resources. Easy peasy.
CDK, on the other hand, uses a more imperative approach. You’re not just stating what you want, but also giving instructions on how to achieve it. Think of it as writing a recipe instead of a grocery list.
The Use Case
You have a team of developers comfortable with general-purpose languages like Python or TypeScript. You need to deploy resources in AWS. The infrastructure’s complexity is expected to grow. You have two options: CF or CDK.
Let’s talk CloudFormation
CloudFormation lets you manage resources in a straightforward, predictable manner. Write your templates in JSON or YAML and let AWS handle the rest.
For example, you need an EC2 instance and an S3 bucket. You describe these resources in your template. CF receives the template and creates the resources. It’s all good until the infrastructure’s complexity grows.
And now, CDK
CDK addresses the shortcomings of CF. It gives you the power to manage your resources…