Using AWS KMS with the Hyperswitch card vault and encryption service

If you run Hyperswitch on AWS and want key material handled by AWS KMS instead of local configuration, this page covers the aws backend options, IAM roles for EKS service accounts and the checks to run before go-live.

On this page

Using AWS KMS with the Hyperswitch card vault and what it changes

A platform team running self-hosted Hyperswitch on AWS usually needs the card vault and encryption service keys held under AWS Key Management Service (KMS) rather than in files or Kubernetes secrets inside the cluster. The aws backend option in the vault and encryption service charts is the documented way to point those services at KMS instead of local key material. Teams usually choose it when their cloud security standard already requires customer-managed keys, central key policy and CloudTrail records of key use, and when they want key administration to sit with the same team that runs their other AWS encryption. The Hyperswitch self-hosting documentation includes an AWS deployment path, so this is the natural starting point for an AWS-hosted stack. Before you commit, confirm with the Hyperswitch release you plan to run which values keys the chart accepts for the AWS backend, and whether the vault and encryption service each read the same or separate KMS keys.

The decision has consequences beyond one chart value. Moving key storage to KMS changes who can unlock and use the keys, how the services authenticate to AWS, and what an incident responder can inspect. On EKS, the services should get AWS access through IAM roles for service accounts rather than static access keys stored in a secret, so the pods assume a narrowly scoped role that can only call the KMS operations the services need on the specific key. Plan the key policy, the IAM role trust relationship and the region together, because a key created in one region cannot be used from a service running in another. Ask your Hyperswitch or DeployOpen contact to confirm which settings move out of local configuration and which still need to be set by hand, and record that list in your change plan.

A KMS backend does not remove the dual control and custodian work that the vault still requires. The master and custodian keys, the unlock sequence after a restart and the runbook for a departing custodian are covered in the custodian section of this guide, and KMS access does not replace them. Test the design before real card data arrives. Confirm that a pod restart recovers cleanly, that an IAM role revocation fails closed, that a disabled or deleted key is detected by monitoring, and that KMS and CloudTrail logs show the calls you expect. Treat the cloud account that owns the key as part of your PCI DSS scope and document who can change its key policy.

Key storage options for the Hyperswitch vault and encryption service

This table compares the four key storage choices a self-hosting team weighs for the vault and encryption service: AWS KMS, HashiCorp Vault, an HSM and a cloud KMS from another provider. Read each row against your hosting footprint and who will operate the backend, then confirm the backend options and their settings in the Hyperswitch documentation before you commit.

OptionWhere it fitsWho operates itConfirm before choosing
AWS KMSStacks running in AWS, especially EKS clusters where pods can assume an IAM role for service accountsYour cloud team, through AWS account, IAM and key policy administrationWhich key types and key settings the aws backend in the charts expects, and the region and key ARN format
HashiCorp VaultOn-premise or multi-cloud stacks that already run Vault for secrets, or where you want one backend across environmentsYour platform or security team, including Vault high availability, unsealing and token lifecycleThe token and URL settings the vault backend requires, and how the chart handles token renewal
HSM (hardware security module)Regulated environments that require keys to stay in dedicated hardware with tamper resistance and custodian-controlled accessYour security team with the HSM vendor, plus a separate custody procedure for the device and its credentialsWhether the documented HSM option for the encryption service matches your device, and what key import and backup steps it needs
Cloud KMS on another providerStacks hosted outside AWS where the provider's key service is already approved and audited in your environmentYour team for that provider's account and policies, with network access from the cluster to the key serviceWhether Hyperswitch documents a backend for that provider, since the AWS and HashiCorp options may be the only ones shipped in the charts
Operational ownershipEvery option moves key custody into a system you run, so the chosen backend becomes part of your change and access reviewsNamed owners for the backend, its credentials and its audit logsWho approves key rotation and how unlock or access recovery works after an outage
Audit and evidenceAssessors will ask who can use the key, how use is logged and how access is revokedYour compliance team with the platform team, using key policy and logging output from the chosen backendWhich audit logs the backend emits and where Hyperswitch records key operations, if anywhere

What moves out of local configuration when KMS takes over

When the aws backend is selected instead of local key configuration, the most visible change is that the master key stops being a value your deployment holds and becomes a reference to a customer managed KMS key. The settings that carry that reference move into the chart values for the vault and encryption service: the KMS key identifier (a key ID, ARN or alias, depending on what the chart accepts), the AWS region where that key lives, and the pod identity that calls KMS. Exact value names differ between chart releases, so confirm the keys in the chart README for the release you run before writing any values file. Remove the local key material from the values and secret stores once the KMS path is verified, so that a leaked values file cannot be used to recover the locker keys.

The pod identity change is the one most likely to be misconfigured. On EKS, the service account used by the vault and encryption service should be bound to an IAM role through IAM roles for service accounts, and that role should allow only the KMS operations the service needs against the one key. Confirm the operation set in the chart documentation rather than granting broad kms:* permissions. Who can administer the key moves into AWS as well: the key policy, the IAM policies attached to administrators and any grants become part of the key custody record, alongside your custodian roster. Review them together, record who can change the policy or schedule deletion, and keep an audit trail of changes using AWS CloudTrail. Any drift between the key policy and the custodian procedure is a finding an assessor will ask about.

How to set up the AWS KMS backend on EKS

This sequence takes a platform team from an undecided key setup to a Hyperswitch card vault and encryption service that run on EKS and use AWS KMS for key operations. Each step closes with a check so the team knows whether to move on. The first run happens in a non-production cluster, so key access problems surface before any real card data is involved.

  1. Create or choose the KMS key in the target region

    The platform team, working with the security team, selects the AWS account and region where the vault and encryption service will run, then creates a symmetric customer managed KMS key in that region for the vault and encryption service. Record the key ID and ARN, and confirm the region matches the EKS cluster and the data residency commitments you have made to merchants. Keep the non-production key separate from the production key. Check: the key exists, is enabled, and its ARN is written into your deployment records for both environments.

  2. Define the key policy and administrators

    The security team writes the KMS key policy so that a small set of named administrators can manage the key, while only the IAM role used by the vault and encryption service can call decrypt and encrypt operations on it. Keep administrative actions such as key deletion and policy changes separate from runtime use. Review the policy with the custodians who will own the key lifecycle. Check: a policy review confirms that no broad principal, such as the whole account, can use the key, and that the administrators are named individuals or approved roles.

  3. Create the IAM role and trust policy for the service account

    On the EKS cluster, the platform engineer confirms that the cluster has an OIDC identity provider registered with IAM, then creates an IAM role whose trust policy allows the Kubernetes service account used by the vault and encryption service to assume it. The role policy grants only the KMS actions the service needs on the key from the previous step. Create the service account in the target namespace with the role annotation. Check: the service account shows the role annotation, and an AWS identity check run from a test pod returns the expected role session.

  4. Set the aws backend and region in the charts

    The platform engineer sets the key backend to aws in the values for the vault and encryption service charts, along with the KMS key identifier and region, and points the chart at the service account created in the previous step. Values that are currently local configuration, such as the local key material, move out of the chart values and into KMS-managed references. Confirm the exact key names against the chart version you deploy, because they change between releases. Check: rendering the charts with the new values produces manifests that reference the aws backend, the correct region, and the intended service account, with no local key material left in the output.

  5. Deploy to a non-production cluster

    The platform team deploys the vault and encryption service to a non-production EKS cluster using the same chart and values structure planned for production, through the deployment pipeline your team already uses. Watch the rollout and the pod logs during startup, since configuration errors often appear only when the service first calls KMS. Keep the production values in a separate file so that nothing non-production is promoted by accident. Check: pods reach a ready state, and the logs show the service initialized the aws backend without falling back to local key material.

  6. Verify startup and decrypt a test value

    The platform engineer runs a test that encrypts a known sample value through the encryption service, then decrypts it, and confirms the round trip returns the original value. The test uses a dummy value only, never real card data or real merchant credentials. Note any error the service returns, because permission errors from KMS usually name the missing action. Check: the decrypt result matches the sample, and the services report healthy after the test.

  7. Confirm access is logged in CloudTrail

    The security or platform team checks AWS CloudTrail for the KMS Encrypt and Decrypt events created by the test, and confirms they are attributed to the service account role rather than a shared user. Confirm that your organization's log retention and access review processes cover these events. Ask your auditors which evidence they will expect for key use before production. Check: the test events appear in the expected trail with the correct role identity, and the team has recorded where the evidence lives.

How the vault, encryption service and KMS connect on EKS

The diagram starts at the Hyperswitch app server, which calls the card vault and the encryption service inside the cluster. Each of those pods runs under its own Kubernetes service account, and that account is linked to an IAM role through the cluster's OIDC provider, so the pod receives temporary AWS credentials without a static key in its configuration. The role's policy permits cryptographic calls against one KMS key in the chosen region. Check that each service account annotation matches the role, that the key policy names the role, and that every call to KMS stays inside the client's AWS account boundary.

Service account to IAM role to KMS path inside the client's AWS account.

Security controls to design before the first saved card

The KMS backend turns the vault's key material into a cloud-managed control, so the controls around it decide who can unwrap card data. Design them before the first saved card, because your PCI DSS scope follows the vault, and the vault follows the key.

Scope the IAM role trust

Bind the IAM role to the exact Kubernetes service account and namespace that run the card vault and encryption service, using the trust policy conditions for the service account subject. A wildcard subject or a shared role across workloads lets another pod request decryption. Check the trust policy with a test pod in a neighboring namespace, which should fail to assume the role. Confirm the exact condition keys against current AWS documentation for IAM roles for service accounts on EKS.

Hyperswitch self-hosting docs

Separate key administrators from callers

The KMS key policy should split administrative actions (editing the policy, scheduling deletion, changing rotation) from cryptographic actions (encrypt and decrypt). The vault's role should have only the decrypt and data key operations it needs. Administrators should not also hold decrypt rights, or one person can both change the policy and read card data. Ask your team to write this split down before the first deployment.

Log every KMS call

Enable AWS CloudTrail for the account and region that host the key, so every encrypt, decrypt and policy change is recorded with the calling role. Route those logs to a store that the application team cannot edit. Alert on decrypt calls from unexpected principals and on any key policy change. Confirm your retention requirement with your compliance team, since logs of cardholder data access are often part of PCI DSS evidence.

Confirm key rotation settings

Decide whether automatic rotation is enabled for the customer managed key and how the vault handles data encrypted under earlier key material. Rotating the KMS key does not re-encrypt stored card data by itself, so plan the re-encryption path before you turn rotation on. Check the current AWS documentation for how rotation applies to symmetric keys and how the rotation period is set, rather than relying on a default you have not read.

Plan cross-account and multi-region use

A key in one AWS account or Region is only usable from another if the key policy and the calling role both allow it, and a multi-Region key is a separate design choice. If the vault runs in a different account from the key, or in a second Region for failover, the data path and the audit trail both change. Document which account owns the key, which accounts call it, and whether a Region outage would stop card decryption. Validate the Region behavior in a test before go-live.

Recover access after a misconfiguration

A bad key policy or trust condition can lock out the vault on its next restart, and the vault cannot store or read cards until access returns. Keep a break-glass path owned by a named administrator, documented in your runbook, and test it in a non-production account. Restore the previous policy from version control, not from memory. Treat the PCI DSS scope of any emergency access as in scope, because the merchant remains fully responsible for PCI DSS certification and data handling under the in-house model.

In-house PCI model docs

How the AWS KMS path differs by cluster and cloud setup

This is the setup the AWS backend is most directly designed around: the cluster, the KMS key and the vault and encryption service pods all sit in one AWS account and region. The workload identity model on EKS is the piece to confirm with your platform team and against the Hyperswitch Helm chart values, since the exact mechanism must match what the chart expects. Calls to KMS stay on AWS networking, so reachability is usually a question of endpoints, routing and policy rather than internet egress.

  • Identity: Confirm which service account identity the vault and encryption service pods use, and that the IAM permissions are scoped to the single KMS key they need.
  • Network: Confirm that the nodes or pods can reach the regional KMS endpoint, including any private endpoint and egress controls you apply.
  • Latency and dependency: KMS calls are on the unlock and decrypt path, so a regional KMS issue can block vault operations even when the cluster is healthy.
  • Disaster recovery: Plan for a second region only if the KMS key and its replication or recovery approach are designed for it, and confirm how the key is restored.
  • Ownership: Record who owns the key policy, so that key administration stays separate from the people who deploy the charts.

Before go-live, check the identity mechanism, the key policy and a failed-call test in a non-production account.

Limits to confirm in your environment before go-live

The AWS KMS backend depends on four moving parts: the chart, the Hyperswitch release, any required dependency, and your AWS account. Each item below is a check to run against your own environment, not a promise that the stack will behave a certain way.

Chart support for the aws backend

Confirm that the release of the vault and encryption service charts you plan to deploy supports the aws backend, and read its values file for the exact key that selects it. Chart releases change, so check the chart version you pin rather than the latest documentation. If the chart does not expose the backend, the KMS path is not available in that version, and you need to decide whether to pin an older chart or change the key storage design before build starts.

Self-hosting docs

Release compatibility with the chart

Hyperswitch ships roughly monthly minor releases, and each one publishes its own compatibility matrix for Control Center and web client versions. Match the router, vault and encryption service versions to the chart version you pick, and recheck the matrix at every upgrade. Treat the matrix as the source of truth for your pinned set, since a release that works with one chart may not work with another.

Hyperswitch releases

Required dependencies in the deployment

Check whether the release you target needs services beyond the router, vault and encryption service. Superposition became a required configuration dependency in v1.124.0, and deployments must have a Superposition service running before upgrading to that version. Confirm the same for any release you adopt, because a missing dependency can block startup regardless of how the KMS backend is configured.

Release notes

KMS quotas and request rates

Ask your AWS account team and review the Service Quotas console for KMS in the target account and region, including request rate limits for cryptographic operations. Vault unlock, encryption and decryption calls all reach KMS, so a busy stack or a restart storm can hit throttling. Load test the expected peak against those limits and record the headroom before you set replica counts.

Regional availability of KMS features

Confirm that the KMS features your design uses, such as the key types and key policies you need, are offered in the Region where the cluster runs and in any Region you plan to use for recovery. Do not assume a feature is available in every Region because the service exists there. Check the current AWS documentation for each Region on your shortlist.

Exact fields each chart version expects

Read the values schema of your pinned chart version and list every field the aws backend requires, including the KMS key identifier, the Region, and the service account name for IAM roles for service accounts on EKS. Field names and structure can differ between chart versions, so a values file copied from another release may load but fail at runtime. Validate the rendered manifests in a non-production cluster before go-live.

Questions teams ask before configuring AWS KMS for Hyperswitch

How much does it cost to configure AWS KMS for the Hyperswitch vault?

No price is published for this work, and any figure you see should come from a written quote based on your scope. The cost is mostly labor: the platform engineer hours to configure the chart values, the IAM role and KMS key policy, and the verification run, plus the time of the AWS account owner and whoever approves key policy. Cloud KMS charges for keys and API requests are a separate, recurring line on your AWS bill, so ask for them to be estimated against your expected vault and encryption traffic. Costs rise with the number of AWS accounts and regions, the number of encryption keys you plan to manage, and how many environments need the same setup.

How long does AWS KMS setup take for the Hyperswitch card vault?

The duration depends on how far the AWS account and EKS cluster are from being ready. If the KMS key, IAM role for service accounts and namespace already exist, the change is mostly chart configuration and a controlled restart. If the team has to design the key policy, agree on who administers KMS, and build the test path in a non-production environment first, the work takes longer. Confirm the timeline with your own change calendar, since the vault and encryption service are sensitive and usually go through a change review before production.

What must our team provide before the KMS configuration starts?

Plan to provide four things: an AWS account and region where the KMS key will live, an EKS cluster with the Hyperswitch namespace and access for the platform team, an AWS IAM administrator who can create roles and policies, and a KMS administrator who will own the key policy. You also need access to the Hyperswitch Helm charts for the vault and encryption service at the version you intend to run. Name the people for each role in writing. Without a named KMS administrator, key policy changes tend to stall or get made informally.

Can one platform engineer configure the AWS KMS backend alone?

A single experienced platform engineer can often do the chart and IAM work, but a second person should review the key policy and the IAM trust relationship before production. The risk is less in the typing than in the separation of duties: the person who edits the key policy should not be the only person who can approve it, and the vault is a card data system where dual control is expected. Ask your compliance lead which approvals they need on record, and plan for the engineer to be available during the first restart.

What recurring work follows after AWS KMS is configured?

Recurring work includes reviewing the KMS key policy and IAM role on a schedule, auditing which principals can call KMS, and checking CloudTrail records for key use. You also need to plan chart and release upgrades, because the Hyperswitch release cadence and compatibility requirements change which chart values you set, and every upgrade should be tested against the KMS path before production. Budget for key rotation decisions and for testing restores of the vault data alongside KMS access, since a working KMS key is useless without the matching encrypted data.

What breaks most often when the Hyperswitch vault uses AWS KMS?

The most common failures are an IAM role that the service account cannot assume, a key policy that does not grant the vault role the decrypt action, and a region mismatch between the configured KMS key and the cluster. Confirm the exact values for the aws backend against the chart documentation for your version, including the key identifier, region and service account annotation. Test a fresh pod start after each change, because a configuration that works for a running pod can fail on the next restart.

When is outside help worth buying for AWS KMS with Hyperswitch?

Outside help is most useful when the team has no one who has configured KMS key policies for regulated workloads, when the vault must pass an assessment soon, or when several environments and accounts need the same pattern. DeployOpen plans, implements, hardens, documents and supports self-hosted open-source platforms in your own cloud accounts, under a fixed scope agreed in writing before work starts. Ask any partner to name the deliverables, the test evidence, and who keeps the KMS policy after handover.

How DeployOpen works on this

DeployOpen plans, builds and hands over the AWS KMS backend for the Hyperswitch card vault and encryption service inside your own AWS accounts and EKS clusters. Each step is agreed in writing first, so your security, platform and compliance teams know exactly what is configured, who can use the key and what evidence they receive.

How we scope

  • Confirm the AWS account structure, regions and EKS cluster that will host the vault and encryption service.
  • Agree the KMS key policy, key administrators and the roles allowed to call encrypt and decrypt.
  • Define which settings move from local chart values to the aws backend and who owns each one.

How we build

  • Create the KMS key and IAM roles for service accounts, then wire the key region and role into the chart values.
  • Test vault startup, unlock and a saved-card round trip in a non-production cluster before production.
  • Review the configuration against your access and audit logging requirements and record the changes made.

How we hand over

  • Deliver the configuration, IAM policy documents and a runbook covering key rotation and role changes.
  • Walk your platform and security engineers through the restart, failover and key access procedures.
  • Document the evidence your compliance team needs, while independent auditors make any assessment decisions.

How we support

  • Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts.
  • Ongoing support, upgrades and continuous testing are available as a retainer after handover.
  • Ask for a written quote based on your scope, since DeployOpen does not publish a price list.

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.