AWS CDK vs Terraform

Programmatic IaC.

Overview

AWS CDK and Terraform sit at opposite ends of the IaC philosophical spectrum. CDK is programmatic: write TypeScript, Python, or Go that synthesises CloudFormation under the covers. Terraform is declarative: write HCL that describes desired state and let the planner reconcile reality. The choice depends on whether your team prefers code or config and whether you stay AWS-only or run multiple clouds.

The approach

Match the tool to the team's language fluency, the cloud surface, and the change-review culture. Both ship working infrastructure; the engineering experience differs sharply.

Why this compounds

The right IaC tool keeps paying back: every new environment inherits the same modules, the same plan-and-apply gate, and on-call always knows where the source of truth lives.