Softwr

Software · head to head

AWS CloudFormation vs AWS KMS

AWS CloudFormation logo

AWS CloudFormation

Software

Declarative infrastructure as code for AWS, free for AWS resources

From
Free
Free plan
Yes
AWS KMS logo

AWS KMS

Software

Managed encryption key service used by most AWS storage and database services

From
$1/month
Free plan
No

The short version

  • AWS CloudFormation is free; AWS KMS starts at $1/mo.
  • Only AWS CloudFormation lists stacks and templates; only AWS KMS lists customer managed keys.
  • Where AWS CloudFormation falls short: it only manages AWS, so multi-cloud estates need Terraform or Pulumi alongside it.
  • 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 CloudFormation and AWS KMS differ?

AWS CloudFormation 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 CloudFormation and AWS KMS actually diverge.

Attributes where AWS CloudFormation and AWS KMS differ
AttributeAWS CloudFormationAWS KMS
Starting priceFree$1/month
Pricing modelNo charge for AWS resource types; extensions per handler operationPer key per month plus per 10,000 requests
Free tierYesNo
PlatformsWeb, Linux, macOS, WindowsWeb

Which features does each one have?

They share no listed features; 6 appear only for AWS CloudFormation 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 CloudFormation

  • Stacks and templates
  • Change sets
  • Drift detection
  • StackSets
  • Rollback
  • Registry extensions

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 CloudFormation is most often brought in for recreating identical dev, staging and production environments on AWS; 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 CloudFormation

  • Recreating identical dev, staging and production environments on AWSnot AWS KMS
  • Deploying one baseline of security resources across many accounts with StackSetsnot AWS KMS
  • Serverless applications packaged with AWS SAMnot AWS KMS
  • Previewing and auditing infrastructure changes through change setsnot AWS KMS

AWS KMS

  • Meeting a compliance requirement for customer-controlled encryption keys on S3 and RDSnot AWS CloudFormation
  • Signing artefacts or JWTs with asymmetric keys that never leave the HSMnot AWS CloudFormation
  • Encrypting application secrets and data keys with envelope encryptionnot AWS CloudFormation
  • Separating key administrators from data users with key policies and audit logsnot AWS CloudFormation

Where do AWS CloudFormation and AWS KMS fall short?

AWS CloudFormation's most cited limit: it only manages AWS, so multi-cloud estates need Terraform or Pulumi alongside it. 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 CloudFormation

  • It only manages AWS, so multi-cloud estates need Terraform or Pulumi alongside it
  • Raw templates are verbose and hard to reuse, which is why many teams add CDK on top
  • A failed update can leave a stack in a stuck state such as UPDATE_ROLLBACK_FAILED that needs manual intervention
  • New AWS features sometimes arrive in CloudFormation after the console and API, so you wait or script around the gap
  • Deleting a stack deletes its resources, so a mistaken delete of a stack with data needs DeletionPolicy discipline

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 CloudFormation and AWS KMS cost?

AWS CloudFormation is free to use; AWS KMS starts at $1/mo. Plan by plan below, from each vendor's own pricing page.

AWS CloudFormation

Free
  • AWS resource typesFree
    • No additional charge for using CloudFormation with AWS resources
    • You pay for the resources the stack creates
  • Third-party extensionsOn request
    • $0.0009 per handler operation, first 1,000 per month free
    • $0.00008 per second of handler duration beyond 30 seconds

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 CloudFormation if

  • You need stacks and templates.
  • You want to start without paying.
  • You work on Web, Linux, macOS, Windows.
  • You also want change sets.

Choose AWS KMS if

  • You need customer managed keys.
  • You also want service integration.

Questions people ask

Is AWS CloudFormation or AWS KMS better?
It depends on the job. AWS CloudFormation fits recreating identical dev, staging and production environments on AWS; AWS KMS fits meeting a compliance requirement for customer-controlled encryption keys on S3 and RDS. AWS CloudFormation starts at Free and AWS KMS at $1/month.
Which is cheaper, AWS CloudFormation or AWS KMS?
AWS CloudFormation has a free tier; the other does not. Paid plans start at Free for AWS CloudFormation and $1/month for AWS KMS.
Does AWS CloudFormation or AWS KMS run on more platforms?
AWS CloudFormation runs on Web, Linux, macOS, Windows. AWS KMS runs on Web.
Can I use AWS CloudFormation for free?
Yes. AWS CloudFormation has a free tier, so you can try it without paying. AWS KMS starts at $1/month.
What is AWS CloudFormation best used for?
AWS CloudFormation is most often used for recreating identical dev, staging and production environments on aws, deploying one baseline of security resources across many accounts with stacksets, serverless applications packaged with aws sam, previewing and auditing infrastructure changes through change sets. Of those, recreating identical dev, staging and production environments on aws and deploying one baseline of security resources across many accounts with stacksets are not what AWS KMS is typically brought in for.
What can AWS CloudFormation do that AWS KMS cannot?
AWS CloudFormation covers Stacks and templates, Change sets, Drift detection, StackSets. AWS KMS covers Customer managed keys, Service integration, Automatic rotation, Custom key stores.

Answered from the vendors’ own pages

AWS CloudFormation: Does CloudFormation cost money?

Not for AWS resource types. You pay for the resources it creates; third-party extensions are billed at $0.0009 per handler operation after 1,000 free.

AWS 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 CloudFormation: CloudFormation or Terraform?

CloudFormation is AWS-only with state managed by AWS; Terraform spans many providers and keeps its own state.

AWS 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 CloudFormation: How does CDK relate?

CDK lets you write infrastructure in a programming language and synthesises CloudFormation templates.

AWS 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.

Share

Related pages

Other head to heads