AWS Cloud Development Kit
Developer Tools · Common, learn when you need it
Write your AWS setup as normal code instead of a long config file.
A recipe you write in your own handwriting, which a machine then turns into the official form the kitchen requires.
What it actually does
CDK lets you describe infrastructure in TypeScript, Python, Java, Go or C#. It converts that code into a CloudFormation template and deploys it. You get loops, variables and reuse, but you still inherit CloudFormation's behaviour underneath, including slow stack updates and awkward rollbacks. The generated template is often much bigger than one a person would write.
Reach for it when
- Your setup repeats a lot and you want loops and functions
- Your team already writes in one of the supported languages
- You want sensible defaults instead of hand writing every property
Do not reach for it when
- A handful of resources you will rarely change, plain CloudFormation or the console is simpler
- Your team already runs on Terraform, adding CDK gives you two sources of truth
One small example
Ten near identical Lambda functions defined with a for loop over a list of names, rather than ten copied blocks of YAML.
How you pay
CDK itself is free. The surprise is the deploy bucket and the bootstrap stack it creates in every account and region, plus charges for whatever it builds.
Usually sits next to
The real source
This is a simplified summary written for people learning AWS. The official AWS documentation is the authoritative word and it wins wherever this page disagrees with it.