Skip to content
SPECIFICTION
Get listed

AWS CDK vs AWS CloudFormation

AWS CDK

aws.amazon.com

AWS CloudFormation

aws.amazon.com

Side by side

FigureAWS CDKAWS CloudFormation
Price fromFreeFree
Free planYesYes
Free trial——
Open source——
Web—Yes
WindowsYesYes
macOSYesYes
LinuxYesYes
iOS—Yes
API—Yes
Plans published13
Spec score · Infrastructure as Code Tools8.0 (#7)9.0 (#2)
Spec score · Infrastructure Automation8.0 (#10)9.1 (#2)
Spec score · Orchestration / Provisioning Software8.0 (#14)9.1 (#2)
PurposeAWS CDK lets you define cloud application resources using familiar programming languages.CloudFormation models, provisions, and manages related AWS and third-party resources as infrastructure as code.

Plans

AWS CDK

  • AWS CDKFree

AWS CDK pricing →

AWS CloudFormation

  • AWS CloudFormationFree
  • CloudFormation serviceFree
  • Third-party resource providersFree

AWS CloudFormation pricing →

In their own words

AWS CDK

AWS CDK is a framework for defining AWS cloud application infrastructure with familiar programming languages and deploying it through AWS CloudFormation. Stable bindings are available for TypeScript, JavaScript, Python, Java, C#/.NET, and Go. The AWS Construct Library supplies reusable constructs for AWS services and features. CDK Pipelines supports CI/CD deployment to testing, integration, and production environments. In Visual Studio Code, the AWS CDK Explorer preview can browse projects, stacks, resources, and policies. The tool supports AWS only and provides managed state, policy as code, drift detection, importing existing resources, and self-hosted execution. CDK itself has no charge, although deployed AWS resources may incur charges. Developers need Node.js 22.x or later regardless of application language. Deployments use configured AWS credentials and IAM roles. AWS recommends IAM security practices, and custom constructs cannot guarantee compliance because general-purpose code can bypass their checks.

Visit aws.amazon.com

AWS CloudFormation

AWS CloudFormation models, provisions, and manages related AWS and third-party resources as infrastructure as code. YAML or JSON templates define AWS resources and their properties. StackSets deploy a common set of resources across multiple AWS accounts and Regions; Change Sets preview proposed stack updates, including possible deletion or replacement, and Drift Detection tracks changes made outside the service. For authoring, AWS CDK supports TypeScript, Python, Java, and .NET, while AWS SAM offers shorthand YAML for serverless resources that is converted during deployment. The CloudFormation Registry supports third-party resources and modules, and stacks can be updated from remote Git repositories. The service is available through API, Linux, macOS, web, and Windows, and manages state. CloudFormation itself has a free plan, with no additional charge for AWS and Alexa resource providers, but created AWS resources are billed at their standard rates. Third-party provider and custom hook operations may also incur charges. Access can be managed with IAM, and CloudTrail logs API calls.

Visit aws.amazon.com