Developer Tools · head to head
AWS CDK vs AWS KMS

AWS CDK
Developer Tools
Open source framework for defining AWS infrastructure in programming languages
- From
- Free
- Free plan
- Yes

AWS KMS
Developer Tools
Managed encryption key service used by most AWS storage and database services
- From
- $1/month
- Free plan
- No
The short version
- AWS CDK is an Apache 2.
- AWS CDK is free; AWS KMS starts at $1/mo.
- Only AWS CDK lists construct Library of reusable components; only AWS KMS lists customer managed keys.
- Where AWS CDK falls short: targets AWS only, so it does not provision resources on other clouds.
- Where AWS KMS falls short: every decrypt call is a billed request, and workloads that call KMS for each record can accumulate millions of billable requests.
How do AWS CDK and AWS KMS differ?
AWS CDK and AWS KMS differ on starting price (Free against $1/month), pricing model and free tier (Yes against No). Only the attributes on which AWS CDK and AWS KMS actually diverge.
Not yet recorded: category for AWS KMS.
Which features does each one have?
They share no listed features; 8 appear only for AWS CDK and 6 only for AWS KMS. Drawn from each product's published feature list. An absence here means we hold no record of it - not that the product lacks it.
Only in AWS CDK
- Construct Library of reusable components
- CDK CLI for synthesis and deployment
- Programmatic CDK Toolkit Library
- Support for TypeScript, JavaScript, Python, Java, C# and Go
- Deployment through AWS CloudFormation
- Custom and shareable constructs
- Construct Hub registry
- Open source under Apache 2.0
Only in AWS KMS
- Customer managed keys
- Service integration
- Automatic rotation
- Custom key stores
- CloudTrail logging
- Envelope encryption
What is each one used for?
AWS CDK is most often brought in for defining AWS infrastructure in TypeScript or Python; AWS KMS for signing artefacts or JWTs with asymmetric keys that never leave the HSM. The jobs each tool is most often brought in to do.
AWS CDK
- Defining AWS infrastructure in TypeScript or Pythonnot AWS KMS
- Reusable internal infrastructure modulesnot AWS KMS
- Serverless application stacksnot AWS KMS
- Testing infrastructure with unit testsnot AWS KMS
- Standardising environments across accountsnot AWS KMS
AWS KMS
- Meeting a compliance requirement for customer-controlled encryption keys on S3 and RDSnot AWS CDK
- Signing artefacts or JWTs with asymmetric keys that never leave the HSMnot AWS CDK
- Encrypting application secrets and data keys with envelope encryptionnot AWS CDK
- Separating key administrators from data users with key policies and audit logsnot AWS CDK
Where do AWS CDK and AWS KMS fall short?
AWS CDK's most cited limit: targets AWS only, so it does not provision resources on other clouds. AWS KMS's: per-account request quotas can throttle high-volume workloads, forcing data key caching or architectural workarounds. Documented limitations, not opinions. Every one is a constraint you would hit in normal use.
AWS CDK
- Targets AWS only, so it does not provision resources on other clouds
- Deploys through CloudFormation, so its resource coverage and limits apply
- Infrastructure written in code can be harder to review than declarative templates
- The AWS resources it creates are billed separately at standard AWS rates
AWS KMS
- Cost grows with key count, so organisations that create one key per tenant or per object class pay $1 per month for each one, including the keys they forgot
- Every decrypt call is a billed request, and workloads that call KMS for each record can accumulate millions of billable requests
- Per-account request quotas can throttle high-volume workloads, forcing data key caching or architectural workarounds
- Keys are tied to AWS, so using the same keys with other clouds or on-premises systems needs external key stores or a separate tool such as HashiCorp Vault
- Key policies and grants interact with IAM in non-obvious ways, and a misconfigured policy can lock administrators out of a key
How much do AWS CDK and AWS KMS cost?
AWS CDK is free to use; AWS KMS starts at $1/mo. Plan by plan below, from each vendor's own pricing page.
AWS CDK
FreeNo published plan breakdown. See the AWS CDK review.
AWS KMS
$1/month- Customer managed key$1/mo
- $1 per key per month, prorated hourly
- Same price for symmetric, asymmetric, HMAC and multi-Region keys
- First and second rotation each add $1 per month
- RequestsOn request
- $0.03 per 10,000 requests
- 20,000 free requests per month
- $0.15 per 10,000 for most asymmetric requests, $12.00 per 10,000 for RSA GenerateDataKeyPair
Which should you pick?
Choose AWS CDK if
- You need construct library of reusable components.
- You want to start without paying.
- You work on Windows, macOS, Linux.
- You also want cdk cli for synthesis and deployment.
Questions people ask
- Is AWS CDK or AWS KMS better?
- It depends on the job. AWS CDK fits defining AWS infrastructure in TypeScript or Python; AWS KMS fits meeting a compliance requirement for customer-controlled encryption keys on S3 and RDS. AWS CDK starts at Free and AWS KMS at $1/month.
- Which is cheaper, AWS CDK or AWS KMS?
- AWS CDK has a free tier; the other does not. Paid plans start at Free for AWS CDK and $1/month for AWS KMS.
- Does AWS CDK or AWS KMS run on more platforms?
- AWS CDK runs on Windows, macOS, Linux. AWS KMS runs on Web.
- Can I use AWS CDK for free?
- Yes. AWS CDK has a free tier, so you can try it without paying. AWS KMS starts at $1/month.
- What is AWS CDK best used for?
- AWS CDK is most often used for defining aws infrastructure in typescript or python, reusable internal infrastructure modules, serverless application stacks, testing infrastructure with unit tests. Of those, defining aws infrastructure in typescript or python and reusable internal infrastructure modules are not what AWS KMS is typically brought in for.
- What can AWS CDK do that AWS KMS cannot?
- AWS CDK covers Construct Library of reusable components, CDK CLI for synthesis and deployment, Programmatic CDK Toolkit Library, Support for TypeScript, JavaScript, Python, Java, C# and Go. AWS KMS covers Customer managed keys, Service integration, Automatic rotation, Custom key stores.
Answered from the vendors’ own pages
AWS CDK: Which languages does AWS CDK support?
The AWS documentation lists TypeScript, JavaScript, Python, Java, C# and .NET, and Go. Infrastructure is defined as constructs composed into stacks and apps.
SourceAWS KMS: How much does AWS KMS cost?
$1 per month per customer managed key, $0.03 per 10,000 requests, and a free tier of 20,000 requests per month, per the AWS pricing page.
AWS CDK: How does AWS CDK deploy resources?
CDK apps are synthesised and deployed through AWS CloudFormation. The documentation states this gives predictable, repeatable deployments with rollback on error.
SourceAWS KMS: Are AWS managed keys free?
Keys that AWS services create on your behalf (AWS managed keys) have no monthly fee; usage charges for requests may still apply as shown on the pricing page.
AWS CDK: Is AWS CDK free?
It is open source under the Apache 2.0 licence according to its GitHub repository. The AWS resources you provision with it are charged at their normal rates.
SourceAWS KMS: What is the difference between KMS and CloudHSM?
KMS is a multi-tenant key service integrated with AWS services. CloudHSM gives you dedicated single-tenant HSMs, and in the AWS example a two-HSM cluster costs $1.60 per HSM per hour.
AWS CDK: When was AWS CDK first released?
Wikipedia reports a developer preview announced in 2018 and general availability on 11 July 2019. CDK v2 followed in 2021.
SourceRelated pages
Other head to heads
- AWS CDK vs Terraform
- AWS CDK vs HCP Terraform
- AWS CDK vs Atlantis
- AWS CDK vs Pants Build
- AWS CDK vs Biome
- AWS CDK vs Frappe
- AWS CDK vs Spacelift
- AWS CDK vs Eclipse
- AWS CDK vs Python
- AWS CDK vs Backstage
- AWS CDK vs Jitsu
- AWS CDK vs Notepad++
- AWS CDK vs GitHub Codespaces
- AWS CDK vs GitKraken
- AWS CDK vs Helm
- AWS CDK vs iTerm2
- AWS CDK vs PDAL
- AWS CDK vs Rust
- AWS CDK vs HashiCorp Vault
- AWS CDK vs Baffle
- AWS CDK vs Enpass
- AWS CDK vs Mullvad VPN
- AWS CDK vs IVPN
- AWS CDK vs Passbolt
- AWS CDK vs LastPass
- AWS CDK vs Private Internet Access
- AWS CDK vs TunnelBear
- AWS CDK vs Eagle Eye Networks
- AWS CDK vs Rhombus Systems
- AWS CDK vs Little Snitch
- AWS CDK vs Addigy
- AWS CDK vs Apiiro
- AWS CDK vs Aqua Security
- AWS CDK vs Aura
- AWS CDK vs Black Duck SCA
- AWS CDK vs Symantec Data Loss Prevention
- AWS KMS vs Terraform
- AWS KMS vs HCP Terraform
- AWS KMS vs Atlantis
- AWS KMS vs Pants Build
- AWS KMS vs Biome
- AWS KMS vs Frappe
- AWS KMS vs Spacelift
- AWS KMS vs Eclipse
- AWS KMS vs Python
- AWS KMS vs Backstage
- AWS KMS vs Jitsu
- AWS KMS vs Notepad++
- AWS KMS vs GitHub Codespaces
- AWS KMS vs GitKraken
- AWS KMS vs Helm
- AWS KMS vs iTerm2
- AWS KMS vs PDAL
- AWS KMS vs Rust
- AWS KMS vs HashiCorp Vault
- AWS KMS vs Baffle
- AWS KMS vs Enpass
- AWS KMS vs Mullvad VPN
- AWS KMS vs IVPN
- AWS KMS vs Passbolt
- AWS KMS vs LastPass
- AWS KMS vs Private Internet Access
- AWS KMS vs TunnelBear
- AWS KMS vs Eagle Eye Networks
- AWS KMS vs Rhombus Systems
- AWS KMS vs Little Snitch
- AWS KMS vs Addigy
- AWS KMS vs Apiiro
- AWS KMS vs Aqua Security
- AWS KMS vs Aura
- AWS KMS vs Black Duck SCA
- AWS KMS vs Symantec Data Loss Prevention
