Developer Tools · head to head
AWS KMS vs AWS Serverless Application Model (AWS SAM)

AWS KMS
Developer Tools
Managed encryption key service used by most AWS storage and database services
- From
- $1/month
- Free plan
- No

AWS Serverless Application Model (AWS SAM)
Developer Tools
Open-source framework and CLI for building serverless apps on AWS
- From
- Free
- Free plan
- Yes
The short version
- AWS Serverless Application Model (AWS SAM) is free; AWS KMS starts at $1/mo.
- Only AWS KMS lists customer managed keys; only AWS Serverless Application Model (AWS SAM) lists SAM connectors for IAM permissions.
- 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.
- Where AWS Serverless Application Model (AWS SAM) falls short: targets AWS only, so templates are not portable to other cloud providers.
How do AWS KMS and AWS Serverless Application Model (AWS SAM) differ?
AWS KMS and AWS Serverless Application Model (AWS SAM) differ on starting price ($1/month against Free), pricing model and free tier (No against Yes). Only the attributes on which AWS KMS and AWS Serverless Application Model (AWS SAM) actually diverge.
| Attribute | AWS KMS | AWS Serverless Application Model (AWS SAM) |
|---|---|---|
| Starting price | $1/month | Free |
| Pricing model | Per key per month plus per 10,000 requests | Open-source |
| Free tier | No | Yes |
| Platforms | Web | Windows, macOS, Linux |
Not yet recorded: category for AWS KMS.
Which features does each one have?
They share no listed features; 6 appear only for AWS KMS and 7 only for AWS Serverless Application Model (AWS SAM). 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 KMS
- Customer managed keys
- Service integration
- Automatic rotation
- Custom key stores
- CloudTrail logging
- Envelope encryption
Only in AWS Serverless Application Model (AWS SAM)
- SAM template shorthand for CloudFormation
- SAM CLI project scaffolding with sam init
- Local testing of Lambda functions and API endpoints
- sam sync for syncing local changes to the cloud
- SAM connectors for IAM permissions
- Terraform project debugging support
- CI/CD pipeline support
What is each one used for?
AWS KMS is most often brought in for signing artefacts or JWTs with asymmetric keys that never leave the HSM; AWS Serverless Application Model (AWS SAM) for defining Lambda and API Gateway applications as code. The jobs each tool is most often brought in to do.
AWS KMS
- Meeting a compliance requirement for customer-controlled encryption keys on S3 and RDSnot AWS Serverless Application Model (AWS SAM)
- Signing artefacts or JWTs with asymmetric keys that never leave the HSMnot AWS Serverless Application Model (AWS SAM)
- Encrypting application secrets and data keys with envelope encryptionnot AWS Serverless Application Model (AWS SAM)
- Separating key administrators from data users with key policies and audit logsnot AWS Serverless Application Model (AWS SAM)
AWS Serverless Application Model (AWS SAM)
- Defining Lambda and API Gateway applications as codenot AWS KMS
- Testing Lambda functions locally before deploymentnot AWS KMS
- Building CI/CD pipelines for serverless appsnot AWS KMS
- Converting console-created resources into templatesnot AWS KMS
Where do AWS KMS and AWS Serverless Application Model (AWS SAM) fall short?
AWS KMS's most cited limit: per-account request quotas can throttle high-volume workloads, forcing data key caching or architectural workarounds. AWS Serverless Application Model (AWS SAM)'s: targets AWS only, so templates are not portable to other cloud providers. Documented limitations, not opinions. Every one is a constraint you would hit in normal use.
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
AWS Serverless Application Model (AWS SAM)
- Targets AWS only, so templates are not portable to other cloud providers
- Local testing of functions depends on Docker being installed and running
- Requires an AWS account, the AWS CLI and configured credentials before first use
- Declarative templates, so complex logic needs CloudFormation or the AWS CDK instead
- Does not cover non-serverless infrastructure on its own, which falls back to CloudFormation
How much do AWS KMS and AWS Serverless Application Model (AWS SAM) cost?
AWS KMS starts at $1/mo; AWS Serverless Application Model (AWS SAM) is free to use. Plan by plan below, from each vendor's own pricing page.
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
AWS Serverless Application Model (AWS SAM)
FreeNo published plan breakdown. See the AWS Serverless Application Model (AWS SAM) review.
Which should you pick?
Choose AWS Serverless Application Model (AWS SAM) if
- You need sam template shorthand for cloudformation.
- You want to start without paying.
- You work on Windows, macOS, Linux.
- You also want sam cli project scaffolding with sam init.
Questions people ask
- Is AWS KMS or AWS Serverless Application Model (AWS SAM) better?
- It depends on the job. AWS KMS fits meeting a compliance requirement for customer-controlled encryption keys on S3 and RDS; AWS Serverless Application Model (AWS SAM) fits defining Lambda and API Gateway applications as code. AWS KMS starts at $1/month and AWS Serverless Application Model (AWS SAM) at Free.
- Which is cheaper, AWS KMS or AWS Serverless Application Model (AWS SAM)?
- AWS Serverless Application Model (AWS SAM) has a free tier; the other does not. Paid plans start at $1/month for AWS KMS and Free for AWS Serverless Application Model (AWS SAM).
- Does AWS KMS or AWS Serverless Application Model (AWS SAM) run on more platforms?
- AWS KMS runs on Web. AWS Serverless Application Model (AWS SAM) runs on Windows, macOS, Linux.
- Can I use AWS Serverless Application Model (AWS SAM) for free?
- Yes. AWS Serverless Application Model (AWS SAM) has a free tier, so you can try it without paying. AWS KMS starts at $1/month.
- What is AWS KMS best used for?
- AWS KMS is most often used for meeting a compliance requirement for customer-controlled encryption keys on s3 and rds, signing artefacts or jwts with asymmetric keys that never leave the hsm, encrypting application secrets and data keys with envelope encryption, separating key administrators from data users with key policies and audit logs. Of those, meeting a compliance requirement for customer-controlled encryption keys on s3 and rds and signing artefacts or jwts with asymmetric keys that never leave the hsm are not what AWS Serverless Application Model (AWS SAM) is typically brought in for.
- What can AWS KMS do that AWS Serverless Application Model (AWS SAM) cannot?
- AWS KMS covers Customer managed keys, Service integration, Automatic rotation, Custom key stores. AWS Serverless Application Model (AWS SAM) covers SAM template shorthand for CloudFormation, SAM CLI project scaffolding with sam init, Local testing of Lambda functions and API endpoints, sam sync for syncing local changes to the cloud.
Answered from the vendors’ own pages
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 Serverless Application Model (AWS SAM): What is AWS SAM?
AWS SAM is an open-source framework for building serverless applications with infrastructure as code. It consists of a template syntax that extends CloudFormation and a command-line tool.
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 Serverless Application Model (AWS SAM): Which operating systems does the SAM CLI support?
AWS publishes installers for Linux on x86_64 and arm64, macOS on Intel and Apple silicon, and a 64-bit Windows MSI. macOS versions older than 13.x are not supported.
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 Serverless Application Model (AWS SAM): What licence does AWS SAM use?
The serverless-application-model repository on GitHub is licensed under Apache-2.0.
SourceAWS Serverless Application Model (AWS SAM): How does SAM differ from the AWS CDK?
The documentation says to use SAM instead of the CDK if you prefer a declarative approach to describing infrastructure rather than a programmatic one. The two can also be combined, using the SAM CLI's local testing with CDK applications.
SourceRelated pages
More on AWS Serverless Application Model (AWS SAM)
Other head to heads
- 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 Genetec Security Center
- AWS KMS vs Bitdefender Total Security
- AWS KMS vs Brave Browser
- AWS KMS vs ESET NOD32 Antivirus
- AWS KMS vs NordVPN
- AWS KMS vs Snyk
- AWS KMS vs Malwarebytes
- AWS KMS vs Terraform
- AWS KMS vs LocalStack
- AWS KMS vs Spacelift
- AWS KMS vs Cloudflare Workers
- AWS KMS vs env zero
- AWS KMS vs Atlantis
- AWS KMS vs Backstage
- AWS KMS vs PDAL
- AWS KMS vs Windows Terminal
- AWS KMS vs Claude Code
- AWS KMS vs Harness
- AWS KMS vs Losant
- AWS KMS vs OpsLevel
- AWS KMS vs pnpm
- AWS KMS vs Soketi
- AWS KMS vs Swagger UI
- AWS KMS vs VMware Fusion Pro
- AWS KMS vs Cloud Native Buildpacks
- AWS Serverless Application Model (AWS SAM) vs HashiCorp Vault
- AWS Serverless Application Model (AWS SAM) vs Baffle
- AWS Serverless Application Model (AWS SAM) vs Enpass
- AWS Serverless Application Model (AWS SAM) vs Mullvad VPN
- AWS Serverless Application Model (AWS SAM) vs IVPN
- AWS Serverless Application Model (AWS SAM) vs Passbolt
- AWS Serverless Application Model (AWS SAM) vs LastPass
- AWS Serverless Application Model (AWS SAM) vs Private Internet Access
- AWS Serverless Application Model (AWS SAM) vs TunnelBear
- AWS Serverless Application Model (AWS SAM) vs Eagle Eye Networks
- AWS Serverless Application Model (AWS SAM) vs Rhombus Systems
- AWS Serverless Application Model (AWS SAM) vs Genetec Security Center
- AWS Serverless Application Model (AWS SAM) vs Bitdefender Total Security
- AWS Serverless Application Model (AWS SAM) vs Brave Browser
- AWS Serverless Application Model (AWS SAM) vs ESET NOD32 Antivirus
- AWS Serverless Application Model (AWS SAM) vs NordVPN
- AWS Serverless Application Model (AWS SAM) vs Snyk
- AWS Serverless Application Model (AWS SAM) vs Malwarebytes
- AWS Serverless Application Model (AWS SAM) vs Terraform
- AWS Serverless Application Model (AWS SAM) vs LocalStack
- AWS Serverless Application Model (AWS SAM) vs Spacelift
- AWS Serverless Application Model (AWS SAM) vs Cloudflare Workers
- AWS Serverless Application Model (AWS SAM) vs env zero
- AWS Serverless Application Model (AWS SAM) vs Atlantis
- AWS Serverless Application Model (AWS SAM) vs Backstage
- AWS Serverless Application Model (AWS SAM) vs PDAL
- AWS Serverless Application Model (AWS SAM) vs Windows Terminal
- AWS Serverless Application Model (AWS SAM) vs Claude Code
- AWS Serverless Application Model (AWS SAM) vs Harness
- AWS Serverless Application Model (AWS SAM) vs Losant
- AWS Serverless Application Model (AWS SAM) vs OpsLevel
- AWS Serverless Application Model (AWS SAM) vs pnpm
- AWS Serverless Application Model (AWS SAM) vs Soketi
- AWS Serverless Application Model (AWS SAM) vs Swagger UI
- AWS Serverless Application Model (AWS SAM) vs VMware Fusion Pro
- AWS Serverless Application Model (AWS SAM) vs Cloud Native Buildpacks
