Asset 20 8 2
Does AI recommend your business? Run the free check →

Join 15,000 business owners, marketers and entrepreneurs. The Sunday newsletter you'll be annoyed only arrives once a week.

Article

AWS CDK vs Terraform: Code or Configuration for Your Cloud?

Use the AWS CDK if you build only on AWS and want to define infrastructure in a programming language such as TypeScript or Python; it deploys through AWS CloudFormation. Use Terraform if you work across clouds or SaaS tools, because its providers reach almost any platform with an API and its configuration files read the same everywhere. If you hoped for both through CDK for Terraform, note HashiCorp has deprecated it.

I read the AWS CDK v2 Developer Guide and HashiCorp's Terraform introduction and CDK for Terraform pages. They're a common shortlist, and one change at HashiCorp settles a popular middle-ground plan.

AWS CDK and Terraform compared

AWS CDKTerraform
In one lineOpen source framework for defining AWS infrastructure in codeInfrastructure as code tool for cloud and on-prem resources
How you write itTypeScript, JavaScript, Python, Java, C#/.Net or GoHuman-readable configuration files
How it deploysSynthesises to AWS CloudFormationWrite, Plan and Apply against provider APIs
ReachAWS servicesThousands of providers on the Terraform Registry
Reusable piecesConstructs from the Construct LibraryConfiguration files you can version, reuse and share
Managed optionRuns through your AWS accountHCP Terraform and Terraform Enterprise
Free option (as of October 2026)Yes, the AWS CDK is open sourceNot stated on the pages I read

Why teams pick the AWS CDK

AWS describes the CDK as an open source framework for defining cloud infrastructure in code and provisioning it through CloudFormation. You get a Construct Library of reusable, pre-written building blocks and a Toolkit with a CLI for synthesis and deployment. Because you're writing in a programming language, you get its expressive power, and AWS says you can keep infrastructure, application code and configuration all in one place.

If you're on old code, note that CDK v1 ended support on June 1, 2023, so new work belongs on v2.

Why teams pick Terraform

HashiCorp's introduction says Terraform manages low-level pieces like compute, storage and networking as well as DNS entries and SaaS features, through providers for virtually any platform with an API. The Terraform Registry lists thousands of them, from AWS, Azure and Google Cloud to Kubernetes, GitHub and Datadog. Its workflow is easy to explain to a non-engineer: write the configuration, review the plan of what will change, then apply it.

That plan step is useful for anyone who has to sign off changes. Before anything changes, Terraform shows what it'll create, update or destroy, and on approval it carries out the changes in the right order, respecting dependencies between resources. HashiCorp's get-started tutorials cover AWS, Azure, Google Cloud, Oracle Cloud Infrastructure and Docker, so it's easy to try on whichever platform you already use.

The CDK for Terraform news

For a while, CDK for Terraform let you write Terraform in a programming language, which looked like a handy middle ground. HashiCorp's own page now says CDKTF has been deprecated since December 10, 2025, and that it no longer supports or maintains it. If a tutorial suggests CDKTF, treat it as out of date.

Before you commit to Terraform, I'd suggest reading my explainer on whether Terraform is free.

Choosing in four steps

  1. List every platform you'll manage. Only AWS? The CDK fits. Several clouds or SaaS tools? Terraform.
  2. Ask who writes the infrastructure. If your developers already work in TypeScript or Python, the CDK keeps them in that language.
  3. Check how you'll review changes. Terraform's plan step makes approvals simple to explain.
  4. Don't start new work on CDKTF; pick one of the two tools directly.

For related reading, see this comparison of AWS CloudFront and BunnyCDN and this guide to finding remote DevOps talent if you need someone to run it.

Work with me

Want AI doing the heavy lifting in your marketing?

I build the systems that handle the boring 80 percent, so you get your week back. Done properly, with the human kept in.

My advice on CDK or Terraform

If your whole stack sits on AWS and your developers are comfortable in TypeScript or Python, I'd use the AWS CDK and keep infrastructure in the same language as the app. If you use more than one cloud, or want DNS, monitoring and SaaS settings managed the same way, Terraform is the safer long-term choice. And skip CDK for Terraform for anything new, since HashiCorp has stopped maintaining it.

Do you make a cloud, DevOps or infrastructure tool? Tool makers can ask to be considered for a featured place in comparisons like this one.

Frequently asked questions

Is CDK for Terraform still supported?

No. HashiCorp's page says CDKTF has been deprecated since December 10, 2025 and is no longer supported or maintained.

Which languages does the AWS CDK support?

TypeScript, JavaScript, Python, Java, C#/.Net and Go, according to the AWS CDK v2 Developer Guide.

Does the AWS CDK use CloudFormation?

Yes. AWS says you deploy CDK applications through AWS CloudFormation to provision or update resources.

Can Terraform manage more than one cloud?

Yes. Terraform works through providers, and the Terraform Registry lists thousands, including AWS, Azure and Google Cloud.

What are Terraform's three workflow stages?

Write, Plan and Apply: you define resources, review an execution plan, then apply the changes on approval.

Published and maintained by the Lilach Bullock team, covering marketing, AI and business growth.
Your buyers are asking AI who to use. Does it say you?

See for free whether ChatGPT, Claude, Perplexity, Gemini and Google name you, and get the plan to become the answer.

Check my AI visibility →
Sundays only

Get the Sunday newsletter.

One email a week. AI experiments, marketing tactics, and the workflows Lilach is building right now in her own business.

Subscribe free

Let’s get your marketing running on AI.

Book a free 30-minute call

We figure out what you need, where AI fits in, and what working together would look like.

Book the call →

Or take the 30-second calculator

You’ll see the hours and the money quietly leaking out of your week, and the three workflows worth building first.

Take the calculator →

Or grab the free AI resource library

Prompt packs, templates, checklists, and swipe files. The exact tools I build for paying clients. Yours, free.

Get the library →
Keep reading

More from the blog.

  • YouTube Music をパソコンで使う方法(2026年版)ブラウザとアプリとしてのインストール、曲のアップロード、できないこと

    YouTube Music をパソコンで使う方法(2026年版)ブラウザとアプリとしてのインストール、曲のアップロード、できないこと

    YouTube Music をパソコンで使うには、ブラウザで music.youtube.com を開いてログインするだけです。Chrome なら、その他アイコンの「キャスト、保存、共有」から「YouTube Music をインストール」を選ぶと、アプリのようにワンクリックで起動できるウェブアプリとして使えます(2026年10月時点の YouTube Music ヘルプ)。 スマホのアプリとパソコンでは、できることが少し違います。パソコンでしかできないこともあれば、逆にモバイルアプリ限定の機能もあります。この記事では、2026年10月に確認した YouTube Music の公式ヘルプをもとに、パソコンでの使い方と違いをまとめます。 ウェブアプリとしてインストールする手順 インストールすると、ブラウザのタブを探さなくても、ランチャー アイコンからすぐ…

  • YouTube Music の音質(2026年版)ビットレート早見表、高音質に変える設定、一時保存の音質とデータ量

    YouTube Music の音質(2026年版)ビットレート早見表、高音質に変える設定、一時保存の音質とデータ量

    YouTube Music の音質は、Premium のメンバーなら設定の「データの節約」で選べます。選択肢は低音質(上限 48 kbps)、標準(上限 128 kbps)、高音質(上限 256 kbps)、常に高音質(256 kbps)の4つで、どれも AAC か OPUS です。何も選ばないと、住んでいる地域の「標準」が自動で使われます(2026年10月時点の YouTube Music ヘルプ)。…

  • YouTube Music のダウンロード方法(2026年版)曲とプレイリストの一時保存、SD カード、30日のルールと無料でできること

    YouTube Music のダウンロード方法(2026年版)曲とプレイリストの一時保存、SD カード、30日のルールと無料でできること

    YouTube Music で曲をダウンロードするには、曲やアルバム、プレイリストのメニューから「オフラインに一時保存」を選びます。曲や動画の一時保存には YouTube Music Premium が必要ですが、ポッドキャストはメンバーシップがなくても保存できます。保存したものを残すには、少なくとも30日に1回ネットにつなぐ必要があります(2026年10月時点の YouTube Music ヘルプ)。 YouTube Music では、ダウンロードのことを「一時保存」と呼びます。ファイルとして自由に取り出すのではなく、アプリの中でオフライン再生するための保存です。この記事では、2026年10月に確認した YouTube Music の公式ヘルプをもとに、保存のしかたと、知っておきたいルールをまとめます。 無料と Premium…