AWS Key Management Service vs AWS Secrets Manager

AWS KMS manages encryption keys and signing operations, while AWS Secrets Manager stores, rotates and retrieves secret values and encrypts them with KMS keys, so the two usually work together. Pick by what you must store, how often apps retrieve it, where data must live and how much AWS dependency you accept.

On this page

AWS Key Management Service vs AWS Secrets Manager: which fits your workload

A renewal, a data residency review or a lock-in concern often forces a choice between AWS Key Management Service and AWS Secrets Manager, but the two do different jobs. AWS KMS manages encryption keys and signing operations, while Secrets Manager holds the secret values, such as database passwords and API tokens, that applications read. Secrets Manager protects each value with envelope encryption under a KMS key, so the two usually work together. KMS keys stay inside FIPS 140-3 Security Level 3 validated hardware security modules and never leave KMS unencrypted. Key policies decide which principals can use a key, so review them first. Secret names, descriptions, rotation settings and tags are not encrypted by Secrets Manager, so check whether your review treats that metadata as sensitive.

KMS fits when the workload needs cryptographic operations without handing out key material, such as encrypting data in your own services, signing with an asymmetric key pair, generating an HMAC, or encrypting fields through the AWS Encryption SDK. Secrets Manager fits when an application needs a password, token or certificate at runtime and the value has to change on a schedule. Most managed secrets use managed rotation, which does not need a Lambda function, while other secrets rotate through a Lambda function that updates both the secret and the database or service. Retrieval volume drives cost and throttling: AWS's published Secrets Manager pricing lists $0.40 per secret per month and $0.05 per 10,000 API calls, and BatchGetSecretValue returns up to 20 secrets per call at 100 requests per second per Region. Model the peak call rate from every container, function and pipeline before you choose, and check the Secrets Manager pricing page.

The decision turns on five points. First, what must be stored: KMS holds keys, while Secrets Manager stores secret values of up to 65,536 bytes with up to 100 versions each, within a limit of 500,000 secrets per Region per account that AWS does not let you adjust. Second, retrieval volume, which sets both the API charge and the throttling you must design around. Third, rotation needs, including whether your database engine or SaaS credential is covered by managed rotation. Fourth, data location: confirm the Regions for keys, secret values and any replicas, since a primary secret cannot be deleted while it is replicated to other Regions. Fifth, the AWS dependency you accept. Neither service can be self-hosted, so leaving means decrypting data and re-pointing every caller. Ask your AWS account team to confirm residency and key control terms in writing before the renewal date.

Which AWS service handles your key, signing or secret need

Start at the top with one question: does an application or workload need to fetch a credential at runtime? A yes points to AWS Secrets Manager, which stores secret values and rotates them. From there, ask whether the secrets must stay in your own infrastructure or remain provider-neutral. A yes leads to a self-hosted OpenBao route, and a no keeps the secrets on the managed AWS service. A no at the first question moves to whether the workload needs keys to encrypt data or to sign and generate HMACs. That path leads to AWS KMS, which creates and controls the keys. Many estates use both services, so check each workload separately before choosing one.

Decision path from runtime secret fetches to KMS keys and signing.

Which service fits each common workload

The table maps common AWS workloads to the service that fits best, with the condition that makes each choice valid. Use it as a starting point: KMS covers cryptographic operations on keys you control, Secrets Manager covers stored credentials and runtime retrieval, and self-hosted OpenBao covers workloads that must run outside AWS. Mixed workloads can use both, since Secrets Manager encrypts each secret value with a KMS key.

ScenarioBetter fitWhy
Encrypting data with keys you controlAWS Key Management ServiceChoose KMS when you need keys protected by FIPS 140-3 Security Level 3 validated HSMs and key policies that limit who can use them.
Signing with asymmetric keys or generating HMACsAWS Key Management ServiceChoose KMS when applications sign or generate HMACs with keys that stay inside KMS and are governed by key policies.
Storing and rotating database credentialsAWS Secrets ManagerChoose Secrets Manager when database credentials need scheduled rotation, using managed rotation for supported secrets or a Lambda function for others.
Runtime retrieval of many API keys across servicesAWS Secrets ManagerChoose Secrets Manager when services load many API keys at runtime, since BatchGetSecretValue returns up to 20 secrets per call.
Secrets that must stay in your data centers or span cloudsSelf-hosted OpenBaoChoose self-hosted OpenBao when secrets must stay in your data centers or span several clouds, since both AWS services are AWS-managed only.
A team that needs both key control and secret storageBothUse both when you need KMS keys for encryption and Secrets Manager for rotation, since each secret value is encrypted with a KMS key.

Why KMS and Secrets Manager answer different questions

Teams comparing these two services are often weighing a key service against a secrets store, and the two answer different questions. AWS Key Management Service (AWS KMS) creates and controls the keys used to encrypt and sign data, and it performs those cryptographic operations itself. Its keys are protected by FIPS 140-3 Security Level 3 validated hardware security modules, and according to the AWS KMS Developer Guide, KMS keys never leave AWS KMS unencrypted. Key policies decide which principals can use each key, so a security team should export and read the key policy and grants for every key in scope before assuming access is limited to the intended users.

AWS Secrets Manager answers a different question: where does an application read a secret value at runtime? It stores the value itself, such as a database password or API token, and applications retrieve it through calls such as GetSecretValue or BatchGetSecretValue. Each secret value is protected with envelope encryption under an AWS KMS key, either the AWS managed key aws/secretsmanager or a symmetric customer managed key. The encryption documentation explains how the two layers fit together. A customer managed key gives your team its own key policy to review, so confirm with your key administrators which option your audit scope requires before the first secret is created.

Secret names, descriptions, rotation settings and tags are stored without encryption, so sensitive content belongs only in the secret value. Anyone who can read metadata for a secret can see those fields, so review which roles can describe secrets and avoid putting usernames, customer identifiers or internal hostnames in names or tags. Before rollout, agree a naming standard and a tag policy with the teams that create secrets, and check it during reviews. For most teams, the decision in front of them is therefore Secrets Manager, with KMS as the key layer beneath it. The open questions are which key option fits each workload and which roles can read each secret value.

How AWS KMS and Secrets Manager compare on capabilities

This table compares what AWS Key Management Service and AWS Secrets Manager do, along with the limits and operations AWS publishes for each. Read it by row: KMS creates and uses cryptographic keys, while Secrets Manager stores secret values and encrypts each one with a KMS key. The main takeaway is that Secrets Manager depends on KMS, so any replacement must also decide where its encryption keys will live.

CapabilityAWS Key Management ServiceAWS Secrets Manager
Primary purpose and deploymentManaged service to create and control the keys that encrypt and sign data. Its guide describes no self-managed edition.Amazon's managed service for storing, retrieving and rotating secret values.
OperationsCreates and controls keys, encrypts and signs data, signs with asymmetric key pairs and generates HMACs.Stores secret values and versions, returned through GetSecretValue and BatchGetSecretValue calls.
Key protection and key policiesKeys stay in FIPS 140-3 Security Level 3 validated HSMs. Key policies limit which trusted users can access keys.Each value is envelope encrypted with a KMS key, either aws/secretsmanager or a customer managed key. Names, descriptions and tags are not encrypted.
IntegrationsServer-side encryption on AWS services, the AWS Encryption SDK and the AWS Database Encryption SDK.Relies on KMS keys for encryption. Confirm other service integrations in the Secrets Manager documentation.
Storage limitsSecret storage limits do not apply to keys. Check KMS quotas in AWS documentation before sizing.Up to 65,536 bytes per value, 100 versions per secret and 500,000 secrets per Region per account. These quotas are not adjustable.
Retrieval limitsConfirm request rate quotas for KMS operations in AWS documentation.GetSecretValue at 10,000 requests per second and BatchGetSecretValue at 100 requests per second per Region. Each batch call covers up to 20 secrets.
Rotation and auditConfirm key material rotation behavior and how key use is logged in CloudTrail.Managed rotation for most managed secrets, and a Lambda function for others. Each secret in a batch call logs its own CloudTrail GetSecretValue entry.
DeletionConfirm key deletion and waiting periods in AWS KMS documentation before relying on them.Deleted secrets have a recovery window of at least seven days. A primary secret cannot be deleted while it is replicated.
Confirm before relying on itCheck key material rotation and any other KMS detail not listed here against current AWS documentation.Check current quotas, rotation and integration details against AWS documentation before sizing or migration planning.

What drives the AWS Secrets Manager bill and what to confirm for KMS

AWS Key Management Service and AWS Secrets Manager are billed differently, and the Secrets Manager bill moves with the number of secrets and API calls. The cards separate published rates from the items you must confirm in AWS pricing and your own account bill before you compare totals.

Secrets Manager published rates

AWS Secrets Manager charges $0.40 per secret per month and $0.05 per 10,000 API calls, with no upfront costs or long-term contracts, according to the AWS pricing page. Each stored secret is a recurring line item whether or not anything reads it, so inventory comes before estimating. Use the current rates in your model and record the date you checked them, because rates can change.

Secrets Manager pricing

KMS rates come from a separate page

The AWS KMS Developer Guide says no contracts or minimum purchases apply to using KMS and points to a separate pricing page for rates. KMS is an AWS managed service with no self-managed edition, so your cost is AWS usage charges, not a product license. Do not carry Secrets Manager figures across to KMS. Pull current KMS rates from the pricing page and model key count and request volume against them.

AWS KMS product page

Secret count and call volume

Your bill scales with how many secrets you store and how many API calls read them. A batch call returns up to 20 secrets, so a workload that reads in batches can produce a different call count from one that reads secrets individually. Ask AWS to confirm whether a BatchGetSecretValue call counts as one API call for billing, because CloudTrail logs a GetSecretValue entry for each secret returned.

BatchGetSecretValue reference

Indirect costs beyond the base rate

Costs outside the base rate include the KMS key that protects each secret value when you choose a customer managed key, logging and audit storage for CloudTrail events, and cross-Region replication of secrets. These may be priced on other AWS services, so none of them shows up in the Secrets Manager headline rate. Check each line against your account's own bill for the last full billing period before you accept an estimate.

What to request in a quote

Ask for a written estimate that lists secret count by Region, expected GetSecretValue and BatchGetSecretValue volume per month, and the number of customer managed keys. Require a stated batch size and a written answer on the batch call billing assumption. Add separate lines for CloudTrail logging, KMS requests and any replicated secrets, and ask which pricing page and date the figures use. A growth case for secret count should be labeled as an illustrative scenario.

Where each service keeps data and what leaving involves

AWS KMS manages the keys that encrypt and sign data. It does not store application secrets as such. Its keys are protected by FIPS 140-3 Security Level 3 validated hardware security modules, and KMS keys never leave AWS KMS unencrypted. You choose the AWS Regions where keys are created, so data residency is largely a Region decision. An exit therefore centers on the data encrypted under those keys and on the code that asks KMS to decrypt it.

  • Data location: Confirm which Regions hold your keys, encrypted backups and dependent services, and whether any multi-Region keys are in use.
  • Key material: Key material never leaves KMS unencrypted, so a key cannot be downloaded and loaded into OpenBao or another platform as plain text. Check the Developer Guide for which key types can be exported before you assume any option exists.
  • Export path: Moving data encrypted under a key means decrypting it with the current key and re-encrypting it under a key in the target platform. Confirm in AWS documentation whether a bulk export tool exists before you plan around one.
  • Contract and API lock-in: There are no contracts or minimum purchases, so lock-in is technical. It sits in key policies, IAM permissions, grants and each application that calls KMS through the AWS SDK.
  • Re-encryption plan: Inventory each key and the data it protects, map a target key for each dataset, and sequence re-encryption so reads stay available during cutover. Keep the source key until no stored ciphertext depends on it.

Check the AWS KMS Developer Guide for export rules and confirm the replacement's key custody model before setting a schedule.

When OpenBao fits better than either AWS service

OpenBao is the better choice when your secrets model cannot depend on one cloud provider. Consider it when secrets must stay in your own data centers, when one secrets model has to span several clouds, or when AWS lock-in is a board or procurement concern. OpenBao is an open-source, community-driven fork of Vault, managed under the Linux Foundation's OpenSSF and licensed under MPL 2.0, with backers including SAP, GitLab, Adfinis and Proton. It provides encrypted secret storage, dynamic secrets for systems such as databases and Kubernetes, encryption as a service, identity-based access control, and lease management with revocation. These capabilities map to what Secrets Manager does for application credentials. They do not replace KMS as the key service behind AWS encryption, so the decision turns on where your secrets model must live.

Running OpenBao is an operating commitment, so plan for it as one. Install it with the OpenBao Helm chart on Kubernetes, which requires Helm 3.6 or later. Your team then owns the storage backend, the unsealing procedure, the high availability layout, TLS certificates, audit log destinations, backups and upgrades. Write down the unsealing procedure and confirm which auto-unseal methods your chosen build supports before you go live. Before you deploy, open the OpenBao releases page and read the v2.7.1 security release dated October 1, 2026, then confirm your target version includes it. Recurring cost is mostly staff time for operations and on-call, plus the Kubernetes capacity and any hardware security module you add. Ask any implementation partner to price each of these components separately in writing.

Be direct about the gaps. KMS integrates natively with AWS server-side encryption, and OpenBao has no direct equivalent, so any S3, EBS or RDS encryption you keep on AWS still depends on KMS and its key policies. FIPS-validated hardware protection depends on the hardware security module you choose, so confirm the validation status of that specific module in writing before a compliance review. If you are moving from HashiCorp Vault, the OpenBao migration guide describes an in-place, node-by-node upgrade, but the path was tested only from Vault Community 1.14.1 on Raft storage with Shamir unseal. Mounts that use plugins OpenBao does not ship are skipped, and new tokens use a shorter format, so inventory your mounts and token consumers before you start.

How a move from AWS Secrets Manager to KMS or OpenBao runs

This sequence moves each secret's value, rotation and consumers out of AWS Secrets Manager and into a target store, and retires old keys and secrets only after every consumer has passed its test. Moving secret values into KMS is a design change, because KMS manages keys and does not store application secret values, so a value move usually needs a store such as OpenBao, with KMS keys still protecting the data.

  1. Inventory secrets, keys, rotation functions and consumers

    List every secret in each Region, the KMS key that encrypts each one, each rotation Lambda function, and each application, pipeline or role that reads them. CloudTrail records a GetSecretValue entry for each secret read, so reviewing those entries shows which workloads still use each secret. Record an owner for each consumer before the cutover begins. Output: an inventory approved by those owners, with a secret count that matches what the Secrets Manager console and CLI report. Confirm that your CloudTrail retention covers enough history to catch infrequent consumers, such as scheduled jobs.

  2. Decide which KMS keys stay in service

    Some KMS keys protect data outside Secrets Manager because other AWS services use them for server-side encryption, so a key linked to secrets may still be needed. For each key in the inventory, review its key policy, grants and the services that reference it, then mark it as retained or scheduled for retirement. Output: a key register approved by the security owner, with the reason for each retained key written next to it. Confirm in the AWS KMS Developer Guide which key types you can delete and how the deletion waiting period works before any key is scheduled for removal.

  3. Read secret values in a planned window

    Agree a retrieval window with each consumer owner so that no workload loses access in the middle of a read. Read each value with GetSecretValue, or with BatchGetSecretValue to fetch up to 20 secrets per call, selected by name, ARN or filter. Batch calls have a quota of 100 requests per second per Region, compared with 10,000 for GetSecretValue, so check the request volume before large exports. Store the export in a restricted location encrypted under a key you control, and keep plaintext values out of tickets and chat. Output: an export manifest whose secret count matches the inventory.

  4. Write values to the target store

    Load each value into the target store and attach an access policy that matches its consumer in the inventory. With OpenBao, that means KV or dynamic secret paths per application, with identity-based policies and lease settings configured for each path. With KMS alone, the design changes: KMS encrypts and holds the keys, while your application or data store holds the ciphertext, because KMS does not store secret values. Rebuild rotation in the target and run one rotation end to end. Output: a successful rotation that updates the stored value and the dependent service's login together.

  5. Update and test each consumer

    Point each application, pipeline or role at the new store, one consumer at a time, and keep the old read path available until that consumer's test passes. Test authentication, least-privilege access, behavior when the store is unreachable, and whether the workload picks up a rotated value. Check CloudTrail for GetSecretValue calls from that consumer, which should stop once the cutover holds. Output: a signed test record for each consumer and no remaining reads of the old secret from that workload.

  6. Retire rotation and delete old secrets

    Turn off the Lambda rotation functions and managed rotation for the migrated secrets, once the target rotation has been proven. Schedule each old secret for deletion, which keeps it in a recovery window of at least seven days before removal, so the secret can still be restored while final checks finish. A primary secret that is replicated to other Regions cannot be deleted while it is replicated, so remove replication first. Output: a deletion list in which each secret links to a passed consumer test and a removed rotation function.

  7. Re-encrypt data under retiring keys

    Find all data encrypted under any KMS key marked for retirement, including application database columns, file stores and backups that your tooling encrypts with that key. Decrypt and re-encrypt that data under a key you keep, using a controlled job, then check that a sample of records reads correctly with the new key. Keep the retiring key available until no data depends on it. Output: a dependency review showing no remaining data encrypted under the retired key, signed off before any key is scheduled for deletion.

Questions buyers ask on AWS Key Management Service vs AWS Secrets Manager

Does AWS KMS replace AWS Secrets Manager?

No. AWS KMS and AWS Secrets Manager do different jobs, and many AWS workloads use both. KMS creates and controls the keys used to encrypt and sign data, and AWS states that KMS keys never leave the service unencrypted. Secrets Manager stores secret values such as database passwords and API tokens, returns them to applications on request and can rotate them. Secrets Manager depends on KMS underneath: each secret value is protected with envelope encryption using either the AWS managed key aws/secretsmanager or a symmetric customer managed key. Secret names, descriptions, rotation settings and tags are not encrypted by that key, so keep sensitive values out of them. The verdict section explains how the two services fit together and where a self-hosted secrets manager could replace the Secrets Manager role.

What does AWS Secrets Manager cost per month?

AWS lists $0.40 per secret per month plus $0.05 per 10,000 API calls, with no upfront costs or long-term contracts, according to the AWS Secrets Manager pricing page. The two cost drivers are the number of secrets you store and how often applications and automation read them. An estate with many secrets pays mostly on secret count, while a busy CI pipeline or a service that reads secrets on every request pays mostly on call volume. Confirm the current regional rates and any extra charges that apply to your setup on that page. AWS KMS has its own pricing page, so add its charges when you compare total spend. Ask for a model of both services based on your actual secret count and monthly call volume before you commit to a design.

How hard is it to migrate off AWS Secrets Manager?

The effort depends on how many consumers read each secret, how many rotation Lambda functions you run and how many KMS keys protect your secrets. Each consumer needs its code, configuration or sidecar changed to read from the new store, and each secret needs its rotation path rebuilt or retired. A small estate with a few secrets and no custom rotation is a contained change. An estate where secrets feed many services, databases and pipelines, with custom rotation functions across several accounts, takes longer and needs more test windows. No timing is promised here because the result depends on your environment. Before scoping, gather counts of secrets, consumers, rotation functions and KMS keys, and agree how old and new stores will run in parallel during cutover.

What does a DeployOpen engagement need from our team?

The work needs five things from your side: a secret and key inventory, AWS account access, a named owner for each application that reads secrets, change windows agreed with operations, and sign-off on the target design before build starts. The inventory lists every secret, its consumers, its rotation method and the KMS key that protects it. Account access should follow least privilege and be set up with your security team. Application owners confirm how each service reads its secrets and test the change. Change windows matter because cutover touches production credentials. Engagements are fixed-scope, so scope, deliverables and timelines are agreed in writing before work starts, and a quote follows from that written scope.

Can our own team run this migration without outside help?

Yes, many teams can, especially when they already have AWS and platform skills. Those teams often handle the inventory and the Secrets Manager changes in-house, because much of the work is mapping consumers and updating configuration. Moving to a self-hosted OpenBao deployment is a larger step. It needs a named owner for unsealing, backups, upgrades and access policies, and that person must be ready to respond to incidents on the cluster. Check whether your team can staff those duties on an ongoing basis, not only during the project. If it cannot, DeployOpen can plan, implement, harden, back up, upgrade and document the deployment, and ongoing support is available as a retainer.

Does DeployOpen certify or audit our environment?

No. DeployOpen prepares systems, controls and evidence for compliance assessments, but it does not issue audit reports, attestations or certifications. Independent auditors and certification bodies issue those. In practice, an engagement can configure access control, audit logging, backup and key handling in your AWS account or self-hosted OpenBao deployment, and document how each control works so your assessor can test it. Ask your assessor which evidence they need before work starts, because requirements differ by framework and by organization. Only the independent assessor can state whether your environment meets a given requirement.

How DeployOpen helps evaluate or move to self-hosted secrets

DeployOpen plans, implements, hardens, backs up, upgrades and documents self-hosted open-source platforms inside your own infrastructure. For AWS Key Management Service vs AWS Secrets Manager, that work starts with a written scope that separates key management from secret storage, so you decide which workloads move to OpenBao and which keep using AWS. Security testing and evidence preparation can run alongside the build.

How we scope

  • Inventory which secrets, keys and API callers are in scope, including KMS key policies and Secrets Manager resource policies.
  • Record each secret's rotation method, including managed rotation and Lambda-based rotation, and who owns each rotation.
  • Most engagements are fixed-scope, so deliverables and timelines are agreed in writing before work starts.

How we build

  • Deploy OpenBao in your own cloud account or data center, integrated with your identity provider and logging pipeline.
  • Migrate Secrets Manager values, rotation Lambdas and consumer code paths in stages, keeping the original path until tests pass.
  • Review key policies and grants, and test access and recovery when a key is disabled.

How we hand over

  • Document the target architecture, secret paths, policies, rotation runbooks and the AWS-to-OpenBao mapping.
  • Prepare control evidence for your assessors, such as access settings and audit logging, while independent auditors issue any report.
  • Run a knowledge transfer with your platform team and confirm the rollback path before cutover.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers after handover.
  • Retainers can cover OpenBao upgrades, tested against your configuration before each rollout.
  • Retest after changes to KMS key policies, Secrets Manager resource policies or consumer IAM roles.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.