AWS CDK
AWS Cloud Development Kit
A development kit for building and managing AWS infrastructure as code.
In one sentence
A development kit for building and managing AWS infrastructure as code.
Overview
AWS CDK is an IaC tool that lets you define AWS infrastructure in programming languages such as TypeScript and Python.
Common use cases
- IaC management
- Reproducing environments
- Provisioning multiple AWS resources at once
CLF-C02 exam points
- An option for Infrastructure as Code
- Generates CloudFormation to manage AWS resources
- Allows defining infrastructure in a development language
SAA-C03 exam points
- Environment differences can be reviewed as code
- Resources can be managed per stack
- Need to understand the scope of impact of delete operations
Practical Use
AWS CDK (Cloud Development Kit) is an Infrastructure as Code (IaC) tool that lets you define AWS infrastructure using general-purpose programming languages such as TypeScript, Python, Java, C#, or Go. Code written with CDK (a CDK app) is internally synthesized (synth) into CloudFormation templates and deployed as CloudFormation stacks. In practice, CDK is adopted for standardizing complex resource configurations by extracting them into reusable Constructs (components), parameterizing per-environment differences (dev / staging / prod) to provision multiple environments from a single codebase, and consolidating Lambda function code and infrastructure definitions into a single language. Compared with writing CloudFormation templates (YAML / JSON) directly, the advantages include IDE completion and type checking, the ability to express loops and conditionals using the syntax of a programming language, and the ability to incorporate best practices as code via reusable Construct libraries (L1 / L2 / L3 Constructs / AWS Solutions Constructs). On the other hand, directly editing a CloudFormation stack that was deployed via CDK without going through CDK breaks synchronization. As an operational rule, the principle that CDK-managed targets are modified only via CDK must be enforced. CDK itself is not charged for, but the created AWS resources incur normal charges. To avoid accidentally creating high-cost resources, it is recommended to enforce a PR review checkpoint. CLF-C02 asks questions such as "Which option allows infrastructure to be managed as code?" and "Which tool generates CloudFormation to manage resources?". A common point of discussion is the differentiation among CloudFormation, CDK, and Terraform (a third-party tool). CDK should be remembered as "AWS's official IaC tool that supports general-purpose languages". Starting at SAA-C03, the focus shifts to stack-splitting granularity, the CDK Construct hierarchy (L1 = thin wrappers around CloudFormation resources / L2 = with safe defaults / L3 = bundled best practices), and deployment permission control for production environments.
Official Documentation
Cost notes
- There is no additional charge for CDK itself, but the AWS resources it creates are billed
- Review to avoid accidentally creating expensive resources
Security notes
- Verify the IAM permissions that are created
- Restrict deployment permissions to production environments
Related services
Related comparison articles
Related comparison articles have not been added for this term yet.
Related architecture diagrams
Related architecture diagrams have not been added for this term yet.
Tags
Last updated: 2026-06-07
Previous term
AWS Config
Next term
AWS CloudFormation