Skip to main content

What's the Difference Between AWS KMS and AWS Secrets Manager?

Compare AWS KMS and AWS Secrets Manager side by side — features, pricing, and ideal use cases to help you choose the right product.

Compare side-by-side

Comparisons
AWS KMS
AWS Secrets Manager
Category

Security, Key & secrets management

Security, Key & secrets management

Description

Managed creation and control of keys to encrypt or digitally sign data

Rotate, manage, and retrieve database credentials, API keys, and other secrets throughout their lifecycle.

Best for
  • Data encryption
  • Digital signing
  • Key management
  • Regulatory compliance
  • Database credentials
  • API keys
  • OAuth tokens
  • SSH keys
  • Certificate management
Key features
  • Symmetric & asymmetric keys
  • Automatic key rotation
  • CloudTrail integration
  • Custom key stores
  • Multi-Region keys
  • Automatic rotation
  • Fine-grained access control
  • Cross-account access
  • CloudFormation integration
  • Audit with CloudTrail
Pricing model

Pay per key + API requests

Pay per secret per month + API calls

Free tier

Yes

No

Expert take

“KMS integrates with 100+ AWS services for encryption at rest and in transit. Use AWS-managed keys for simplicity or customer-managed keys when you need rotation control, cross-account access, or audit granularity. Key policies are the primary access control; IAM policies are secondary.”
— Riku Kobayashi, re:Post Top Contributor [profile]

“Secrets Manager eliminates hardcoded credentials. Automatic rotation via Lambda functions means database passwords change on schedule without application downtime. The caching SDK reduces API calls and latency by storing secrets in memory with configurable TTLs.”
— Oleksii Bebych, re:Post Top Contributor [profile]

Product page

When to use AWS KMS or AWS Secrets Manager

Use AWS KMS when:

  • Data encryption
  • Digital signing
  • Key management
  • Regulatory compliance

Learn more about AWS KMS »

Use AWS Secrets Manager when:

  • Database credentials
  • API keys
  • OAuth tokens
  • SSH keys
  • Certificate management

Learn more about AWS Secrets Manager »

AWS product comparisons

Did you find what you were looking for today?

Let us know so we can improve the quality of the content on our pages