Choose AWS Secrets Manager if your workloads run on AWS and you want a managed service with nothing to operate: it costs $0.40 per secret per month plus $0.05 per 10,000 API calls (US list price, November 8, 2026), plugs into IAM, KMS and CloudTrail, and rotates credentials on a schedule. Choose HashiCorp Vault if you run across several clouds or on-premises, or want short-lived credentials generated on demand: its database secrets engine creates a new username and password per request with a lease, and it can be self-managed or run as HCP Vault Dedicated. Vault's source is under the Business Source License 1.1 with IBM as licensor, which allows internal production use but not offering it as a competing hosted product.
HashiCorp Vault and AWS Secrets Manager side by side
| HashiCorp Vault | AWS Secrets Manager | |
|---|---|---|
| Encryption | Vault encrypts data at rest, controls access through authentication and authorization, and audits all activity including failed attempts. source | Every secret is encrypted with a unique data key protected by a KMS key (the AWS managed key or a customer managed key), using envelope encryption. TLS 1.2 and 1.3 are supported in all Regions. source |
| AI agent access | An official MCP server (github.com/hashicorp/vault-mcp-server) supports stdio and StreamableHTTP. It can create, list and delete KV mounts, read, write, list and delete KV secrets, and manage PKI issuers and roles. Docs describe it as beta, recommend local use only, and strongly discourage production use. source | The user guide has an AI Coding Agents page under retrieving secrets; details were not read. source |
| Developer secrets | CLI (for example vault kv get with -format=table, json or yaml), auth methods such as tokens, LDAP, AWS and Azure, and database secret plugins that manage dynamic credentials. source | Retrieval is documented for Java, Python, .NET, Go, Rust, C++, JavaScript, Kotlin, PHP and Ruby, plus the AWS CLI, console, Lambda, EKS, GitHub jobs, GitLab and CloudFormation. Automatic rotation is supported. source |
| Self-hosting | Self-managed via precompiled binary or packages (Community or Enterprise), or managed as HCP Vault Dedicated. Community features work without a license; Enterprise features require one. source | Not stated in AWS Secrets Manager's documentation |
| Free tier | Not stated in HashiCorp Vault's documentation | Pay-as-you-go with no minimum or setup fees; the AWS managed KMS key aws/secretsmanager is free to use. source |
What are the main differences?
- Price
- AWS Secrets Manager charges $0.40 per secret per month and $0.05 per 10,000 API calls, with no minimum or setup fee. Vault Community is free to run yourself; Enterprise features need a license, and HCP Vault Dedicated is a managed, paid service. source
- Where it runs
- Vault is self-managed from binaries or packages on any infrastructure, on-premises, in any cloud or hybrid, or run for you as HCP Vault Dedicated. AWS Secrets Manager runs only as an AWS service, encrypted with KMS and governed by IAM policies. source
- Dynamic secrets and rotation
- Vault's database secrets engine generates database credentials on demand, each with a lease (by default a 1-hour TTL and a 24-hour maximum), and revokes them when the lease ends. AWS Secrets Manager rotates stored secrets on a schedule: managed rotation for most managed secrets, managed external rotation for partner secrets, and a Lambda function for anything else. source
- License
- Vault 1.15.0 and later is under the Business Source License 1.1, licensed by IBM, converting to MPL 2.0 four years after each release. Production use is allowed except offering Vault to third parties as a hosted or embedded product that competes with IBM's paid versions. AWS Secrets Manager is a proprietary managed service. source
- AI coding agents
- AWS documents a secret safety skill in the Agent Toolkit for AWS: the agent writes
{{resolve:secretsmanager:...}}references,asm-execresolves them in a child process, and a PreToolUse hook blocks direct get-secret-value calls. AWS calls this a best-effort defense, not a security boundary. Vault's official MCP server reads and writes KV secrets and manages PKI; it is in beta, and HashiCorp strongly discourages beta features in production. source - Integrations
- AWS Secrets Manager retrieval is documented for 10 language SDKs plus the CLI, console, Lambda, EKS, GitHub jobs, GitLab and CloudFormation. Vault authenticates through many auth methods, such as tokens, LDAP, AWS and Azure, and adds secret engines beyond key-value, including PKI and database credentials. source
Choose HashiCorp Vault if…
- You run across several clouds, on-premises or hybrid, and want one secrets system for all of it.
- You want short-lived database credentials generated per request instead of rotated shared ones.
- You need PKI, many auth methods and fine-grained policies in the same tool.
- You want to run it yourself, from the free Community edition up to Enterprise.
Choose AWS Secrets Manager if…
- Your workloads run on AWS and already use IAM roles, KMS and CloudTrail.
- You want a managed service with no cluster to operate, unseal or upgrade.
- You have a modest number of secrets and want to pay per secret and per call.
- You want scheduled rotation, including managed rotation that needs no Lambda function for supported services.
How do I switch between them?
Neither product documents a one-step migration to the other, so moves are scripted per secret. From Vault to AWS Secrets Manager: list your KV paths, read each with vault kv get -format=json, and create the matching secret with aws secretsmanager create-secret. Dynamic secrets have no stored value to copy; replace them with a rotated secret in AWS. See how to export from HashiCorp Vault.
From AWS Secrets Manager to Vault: retrieve each secret with the AWS CLI or an SDK and write it with vault kv put. Rotation schedules and Lambda rotation functions do not carry over; recreate them as Vault database roles or your own rotation jobs. See how to export from AWS Secrets Manager. Keep the values out of shell history and temporary files while you copy.
What if AI agents use your credentials too?
Both are built for people first. If coding agents such as Claude Code, Codex or Cursor also deploy and call APIs for you, compare how each product lets an agent use a credential: see six models compared. BotPassword, which publishes this page, is a secrets manager built around agents using keys without being handed the values by default; it is in early access. See BotPassword vs HashiCorp Vault and BotPassword vs AWS Secrets Manager.
Frequently asked questions
Is AWS Secrets Manager cheaper than HashiCorp Vault?
For a small number of secrets on AWS, usually yes, at $0.40 per secret per month plus $0.05 per 10,000 API calls, with nothing to operate. Vault Community has no license fee but needs servers and people to run them; HCP Vault Dedicated and Vault Enterprise are paid.
Can HashiCorp Vault replace AWS Secrets Manager?
Yes. Vault has an AWS auth method and a key-value store, and adds dynamic credentials and PKI. You take on running Vault, or pay for HCP Vault Dedicated, and lose the native IAM and CloudTrail integration that Secrets Manager has.
Is HashiCorp Vault still open source?
Not under an OSI-approved license. Vault 1.15.0 and later is under the Business Source License 1.1, with IBM as licensor, and each release converts to MPL 2.0 four years after publication. Internal production use is allowed.
Does AWS Secrets Manager support dynamic secrets like Vault?
Not in the same way. Secrets Manager stores a secret and rotates it on a schedule, through managed rotation or a Lambda function. Vault generates a new credential for each request and revokes it when its lease expires.
Which is safer for AI coding agents?
AWS documents a skill and hook that keep agents on resolve references run through asm-exec, and calls it a best-effort defense, not a security boundary. Vault's MCP server is in beta and not recommended for production. With either, give the agent's credentials the narrowest IAM or Vault policy you can.