AWS CDK (Cloud Development Kit)
AWS CDK lets you define cloud infrastructure as code in TypeScript, Python, Java, or Go, compiled to CloudFormation templates.
Score Breakdown
⚙ Agent Friendliness
🔒 Security
Never hardcode secrets in CDK code — use SecretValue.ssmSecure() or CfnParameter with NoEcho for sensitive values.
⚡ Reliability
Best When
Best for AWS-native teams who want imperative programming constructs, reusability, and type safety for infrastructure.
Avoid When
Avoid when team prefers declarative IaC (Terraform/CloudFormation) or when multi-cloud support is required.
Use Cases
- • Define complete AWS infrastructure using familiar programming languages with IDE autocompletion
- • Build reusable infrastructure constructs (L3) that encode organizational best practices
- • Generate CloudFormation templates programmatically for review and deployment pipelines
- • Use CDK Pipelines for self-mutating CI/CD pipelines deployed to multiple accounts/regions
- • Compose complex agent infrastructure (Lambda + API Gateway + DynamoDB) with type-safe constructs
Not For
- • Multi-cloud infrastructure — CDK synthesizes to CloudFormation which is AWS-only
- • Teams preferring declarative YAML/HCL over imperative programming for infrastructure
- • Simple single-resource deployments where CloudFormation YAML is more transparent
Interface
Authentication
Uses AWS credentials for cdk deploy. CDK bootstrapping requires AdministratorAccess or scoped CDK deployment permissions.
Pricing
Apache 2.0 licensed. AWS account with billing required for cdk deploy.
Agent Metadata
Known Gotchas
- ⚠ cdk bootstrap must run once per account/region before first deploy — missing bootstrap causes CDKToolkit stack errors
- ⚠ CDK asset uploads go to S3 (ECR for Docker) — large Lambda bundles slow down deploy due to S3 upload time
- ⚠ Construct IDs are part of the CloudFormation logical ID — renaming constructs causes resource replacement (delete + recreate), not update
- ⚠ Stack outputs and cross-stack references create implicit stack dependencies — deploy order matters and circular dependencies cause failures
- ⚠ CDK v2 bundles all AWS constructs in a single package (aws-cdk-lib) — CDK v1's per-service packages are deprecated and incompatible
Alternatives
Full Evaluation Report
Detailed scoring breakdown, competitive positioning, security analysis, and improvement recommendations for AWS CDK (Cloud Development Kit).
Scores are editorial opinions as of 2026-03-06.