Deploying Hyperswitch on AWS with CloudFormation: what the script does for your team
If you need a self-hosted Hyperswitch running on AWS quickly, the Hyperswitch docs provide a CDK script that deploys the full stack through CloudFormation. The script launches the application services, the database and cache layers and the supporting AWS resources as one deployment, so your team does not hand-assemble each piece. Hyperswitch is open source under Apache 2.0, and the stack it deploys includes the Rust Router, the Scheduler (Producer and Consumer), PostgreSQL with a master and replica setup, Redis for caching and the scheduler queue, and the card vault, which is a separate service that holds card data. Each of those components carries its own operational obligations after the first deployment, so the speed of this path should not be read as a reduced scope.
The CloudFormation path suits a platform or infrastructure lead who wants a working environment in a single AWS account for evaluation, a proof of concept or a first pre-production stack, and who is comfortable with AWS-native tooling. The Helm chart path on Kubernetes is the better fit when your standard is an existing cluster you already operate, and the Terraform path suits teams that want reusable modules, Terragrunt environments and state they manage in Git. Decide the path before the first deployment, because moving a running stack between tools is a migration in its own right. Confirm with your AWS account owner whether the stack should be the long-term production foundation or a starting point.
How the CDK script turns into a running Hyperswitch stack
The run starts on the operator's workstation, where git, Node.js 18 or later and an AWS user with admin access are needed before the CDK app is executed. The CDK app synthesizes CloudFormation templates, which create the stacks inside the AWS account, and those stacks launch the Router, the Scheduler producer and consumer, PostgreSQL with a master and replica, Redis and the Control Center. The AWS account is the trust boundary, so check what the admin role can create there and whether the launched services fit your compute limits before you run the deploy.
The operator's deploy path from workstation through CDK and CloudFormation into the AWS account.
Which AWS deployment path fits your team
This table compares the CloudFormation CDK script, the EKS and Helm path, and Terraform with Terragrunt on who runs each one, how much control you keep over network and IAM, how repeatable environments are, and how well each fits a small account. Read each row against your own team's skills and account limits. The main takeaway is that the CDK script is the quickest route to a full stack, while the other two give you more say over what gets built.
| Factor | CloudFormation CDK script | EKS with Helm | Terraform with Terragrunt |
|---|---|---|---|
| Who runs it | Your team runs the script once from a workstation with git and Node.js 18 or later | Your platform team installs the cluster, node groups and EBS CSI driver, then runs the Helm install | Your platform team owns modules, state and Terragrunt environment layouts |
| Admin access needed | An AWS user with admin access, as the Hyperswitch guide requires | Narrower IAM roles for the cluster, nodes and storage driver, which you define | Scoped roles per module and environment, which you define and review |
| Control over network and IAM | Low to medium: the script creates the stack, so you adjust it after deployment | Medium to high: you choose subnets across availability zones and the node group layout | High: network, identities and keys are declared in code you can change |
| Repeatable environments | Repeatable for one stack, but separate environments need separate runs or customization | Repeatable through Helm values files per environment and namespace | Strongest: one codebase can run several environments through Terragrunt |
| Compute limits | The guide warns the stack launches multiple services that may exceed compute limits on smaller clusters | You size node groups yourself, so you can plan capacity against your account quotas | You size node groups in code, so quota checks can be part of the plan review |
| Fit for small accounts | Often the fastest first environment for evaluation, if your quotas cover the stack | Suits teams that already run EKS and want Helm-managed releases | Suits teams with existing Terraform practice and several environments to maintain |
| Ongoing change | Changes usually mean re-running or editing the CloudFormation stack, so confirm the upgrade path with Hyperswitch first | Helm upgrades follow Hyperswitch release notes and compatibility checks | Plan changes and state updates in code, with review before apply |
How to run the CloudFormation deployment step by step
This sequence takes an AWS account from prerequisites to a verified Hyperswitch stack launched through the CDK script and CloudFormation. Each step ends with a check so you know whether to continue or stop and fix the gap.
Confirm the AWS account and region
The platform or cloud owner confirms which AWS account and region will host the stack, and that the account is the one approved for this environment, not a shared or personal account. Check which region the guide's services support and whether the account has room for the stacks it creates. Done when the account ID and region are written into the deployment record and the cloud owner has approved them. Confirm any region-specific limits with AWS before you proceed.
Install git and Node.js 18 or later
The engineer running the deployment installs git and Node.js on a workstation or build host that you control. The guide requires Node.js 18 or later, so check the installed version rather than assuming it. Run the version commands for both tools and record the output. Done when git reports a version and Node.js reports v18 or higher. If the workstation has an older Node.js, install a supported version before going further.
Provision the AWS user with admin access
The cloud owner creates or assigns an AWS identity with the admin access the guide requires, because the script creates many services across the stack. Ask security whether a named, time-limited role can be used in place of a long-lived user, and record who holds it. Configure the local AWS CLI profile for that identity and confirm it resolves to the intended account. Done when the caller identity command returns the expected account and user or role. Expect this to be the step that security reviews most closely.
Clone the CDK deployment script
The engineer clones the Hyperswitch CloudFormation script repository named in the official guide and checks out the revision your team has approved, rather than whatever is on the default branch. Review the repository's files and the CDK project structure before running anything. Record the commit hash in your change record. Done when the local copy matches the approved revision and you have read the README for the required inputs.
Install dependencies and run CDK bootstrap
From the cloned project, install the Node.js dependencies and run the CDK bootstrap command exactly as the guide gives it, using the account and region confirmed in step one. Bootstrap creates the staging resources CDK needs in that account, so it is a one-time action per account and region. Copy the exact commands from the official guide, because they change between versions. Done when bootstrap reports that the environment is complete and no errors appear in the output.
Run the CDK deploy command
Run the deploy command from the guide to synthesize and launch the full stack through CloudFormation. Watch the output and the CloudFormation console for stacks that roll back, because the guide warns that the services may exceed compute limits on smaller accounts. If a stack fails on a quota, record the limit, request an increase or resize the target, and redeploy rather than deleting resources by hand. Done when every stack reports a create or update complete status.
Verify stacks and services launched
Confirm in the CloudFormation console that every stack is in a complete state, then check that the compute services the stack launched are running and healthy. Review the outputs the stacks publish, such as endpoints, and confirm that the Hyperswitch services respond on their health paths described in the guide. Record the stack names, outputs and any deviations in the deployment record. Done when all stacks are complete, services are healthy, and the team has agreed the environment is ready for the next configuration phase.
Why the CloudFormation path asks for admin access and what to do about it
The Hyperswitch CloudFormation guide asks for an AWS user with admin access, and that is the first thing a security lead should weigh before running the CDK script. The reason is breadth: one script creates the network, IAM roles, the compute services, the PostgreSQL database and the Redis cache, so the identity running it must be allowed to create and wire together resources across many AWS services at once. Scoping that down by hand, before you know exactly which roles, policies and security groups the script generates, is guesswork. For a regulated organization, the practical risk is that an admin-level credential used for a build becomes a long-lived path into the account that holds payment-adjacent data and keys.
Start by treating the build as a bounded event. Create a dedicated deployment account or a separate role used only for the CDK run, with a name and tags that make its activity easy to find in CloudTrail. Use time-boxed credentials, such as short-lived session credentials, so that nothing persists once the stack is up. Before you run the script, confirm with the Hyperswitch documentation and the script's own source exactly which IAM actions it calls, because the guide's admin requirement is a statement about the script's needs, not a permissions specification you can copy. Ask Juspay or your implementation partner for that list if the repository does not make it clear.
After the build, review what the script created rather than assuming it is correct. Inventory the IAM roles and policies CloudFormation generated, check for wildcard resource or action grants, confirm which principals can reach the database and cache, and remove the deployment role or revoke its sessions. Then decide who will operate the stack and give those people narrower roles that cover day-two work such as viewing logs and scaling services. Record this review as evidence for your access-control and change-management files, because an assessor will ask who could change production infrastructure and when that access was last reviewed.
Compute limits that can stop a small AWS account
The Hyperswitch CloudFormation guide warns that the script launches several services that may exceed compute limits on smaller clusters. The cards below cover the account limits most likely to stop a deployment partway through, and the checks to run before the first stack is created.
Compute and vCPU quotas
The CDK script launches several services, each with its own compute footprint, so the total vCPU demand can exceed the On-Demand vCPU quota for the account and Region. A partial deployment often leaves stacks in a failed state that must be cleaned up before a retry. Ask your AWS administrator to review the Amazon EC2 service quotas for the target Region, and confirm the account has enough headroom for the node capacity the script creates, not only the minimum the docs mention.
CloudFormation guideInstance type availability
The instance types the script selects must be offered in every Availability Zone it uses within the chosen Region. In a smaller or newer Region, or during capacity constraints, a requested type can be unavailable, which fails node group creation. Confirm the instance families the script uses are offered in your target Region and Availability Zones before you start, and decide in advance whether you will accept a different size or Region.
NAT gateway and load balancer quotas
Private subnets that reach the internet typically route through NAT gateways, and the public entry point uses load balancers. Both resources count against regional quotas that a new or shared account may already use for other workloads. Check the current NAT gateway and Elastic Load Balancing quotas, and confirm whether the design of the stack needs one NAT gateway per Availability Zone, which multiplies the count.
Elastic IP limits
Each NAT gateway that uses a public address consumes an Elastic IP, and the default regional limit on Elastic IPs is small enough to be used up by other accounts resources. Ask whether any existing Elastic IPs can be released, and request an increase before deployment if the account will need more than its current allowance. A failed allocation mid-deployment is hard to diagnose from the stack events alone, so check this quota before the stack is created.
Database instance limits
The stack provisions a managed PostgreSQL database and a cache layer, and both count against instance quotas in the Region. A small account may have a low limit on database instances or on the size classes it can launch, and a Redis or PostgreSQL class that is not allowed will stop the deployment. Confirm the database and cache instance quotas, plus any subnet group or parameter group limits, before you start.
Check service quotas before starting
Review the Service Quotas console for each service the stack touches, and record the current value next to the amount the deployment needs. Run the script in a sandbox account or a non-production Region first so that limit failures appear before production planning starts. Ask the team deploying the stack to write down which quotas they checked, because the answer determines whether to request increases, reduce the footprint or move to a larger account.
When to prefer Terraform over the CloudFormation script
Choose Terraform instead of the CloudFormation script when the network and IAM design must follow your own standards rather than the layout the script creates. The CloudFormation guide deploys the full stack in one pass, which suits a proof of concept or a single environment. If your security team needs to set VPC layout, subnet tiers, IAM roles and permission boundaries before any Hyperswitch service is launched, a reusable module you control is the safer starting point. Ask the team that owns your AWS landing zone which of these they must approve, and whether the script's resources can be changed without breaking the stack.
Terraform also fits better when you need several environments from one codebase, or when infrastructure changes must pass through the review and plan steps your pipeline already enforces. Juspay's Terraform and Terragrunt approach, covered in the sibling topic on provisioning Hyperswitch infrastructure, separates shared modules from per-environment inputs. The CloudFormation script is designed around a single deployment. Confirm with Juspay's current guidance whether the script can be reused across accounts or regions without manual edits before you rely on it for a second environment.
If your organization already runs a Kubernetes cluster on AWS, or plans to, the EKS path lets you manage cluster lifecycle separately from the Hyperswitch Helm release. In that case the CDK script adds a second cluster lifecycle you must operate, upgrade and secure. Compare the admin access the script requires with the narrower roles your platform team would grant. Whichever route you choose, record the decision, the account it runs in and who holds the admin credentials, because those answers determine how the stack is audited and rebuilt later.
Security and operational controls to review after deployment
A CDK-driven install touches IAM, databases, the Control Center and secrets all at once, so each control below needs its own review after the stack is up. The cards cover the admin-scoped principal, data stores, operator access, SSO limits, key handling and the monitoring your team must add. Treat the card vault as a PCI DSS scope decision for the merchant, not a default setting.
Review the admin-scoped IAM principal
The CloudFormation guide has you use an AWS user with admin access, which is broad enough to create, modify and delete almost any resource in the account. After the stack is running, replace that working identity with a narrower deployment role scoped to the stacks, services and regions you actually use, and remove the admin user or its long-lived keys. Check who else holds the same permissions, and confirm that CloudTrail is recording the actions taken under that principal.
CloudFormation guideEncrypt and restrict PostgreSQL and Redis
Hyperswitch relies on PostgreSQL with a master and replica setup, and on Redis for caching and the scheduler queue, so both hold payment-adjacent data. Confirm that storage encryption is enabled, that the databases sit in private subnets with no public endpoint, and that security groups allow traffic only from the application services. Check backup retention and whether restores have been tested, since those settings come from your stack parameters rather than defaults you can assume.
- PostgreSQL layout
- Master and replica
Limit the Control Center access path
The Control Center is the operations console for connecting processors and managing payments, refunds and disputes, so it deserves the same restriction as any admin tool. Decide whether it is reachable from the internet, a VPN or a private load balancer, and enforce that at the network layer, not only in the application. Review which load balancer, DNS record and certificate the stack created, and remove any listener you do not need.
Control Center SSO docsPlan around OpenID Connect-only SSO
The Control Center supports single sign-on through OpenID Connect only. SAML is not supported, there is no JIT or SCIM provisioning, users must be invited first, and roles are managed in Hyperswitch rather than mapped from the identity provider. Before go-live, document how joiners, movers and leavers will be handled manually, and confirm that removing a user at the identity provider also removes Control Center access in your process.
SSO configurationManage secrets, keys and the card vault
The stack generates or accepts secrets for database credentials, service keys and encryption, and those values must not sit in templates, parameter history or shell history. Store them in AWS Secrets Manager or another managed store, restrict who can read them, and set a rotation plan. If you run the card vault in-house, the Hyperswitch docs state that you are fully responsible for PCI DSS certification and data handling, so the vault decision should be made with your QSA before live cards flow.
Add logging and monitoring yourself
The CloudFormation path launches several services, but the team should not assume that logs, metrics and alerts are complete after the stack is up. Define which application logs, load balancer logs, database metrics and CloudTrail events are retained, where they are stored and who can read them. Set alerts for failed deployments, database connection errors, scheduler backlog and unusual administrator activity, and confirm that the retention period meets your own policy.
Questions teams ask before deploying Hyperswitch on AWS with CloudFormation
How much effort does a CloudFormation deployment of Hyperswitch take, and what drives it?
The effort depends mainly on how ready your AWS account is and how much of the stack you plan to keep. The CDK script deploys the full Hyperswitch stack, so the work is less about writing infrastructure code and more about preparing prerequisites, reviewing what the script creates, and checking the result. The main drivers are whether your account already has the network, quotas and permissions the stack needs, how many optional components you run, and how much you change from the default configuration. Ask any partner to split their quote into account preparation, deployment, verification and handover so you can see where the time goes.
Can an internal team deploy Hyperswitch on AWS with CloudFormation without outside help?
A team with working AWS and Node.js experience can run the guide, provided it has the right access and time to read what the script creates. The guide requires git, Node.js 18 or later and an AWS user with admin access. Teams with little CloudFormation or CDK experience usually find the hardest part is understanding the resources in the stack and the costs they create. Ask yourself whether someone on the team will own the stack after launch, because upgrades, monitoring and incident response continue long after the first deployment.
What does outside help typically cover for this deployment?
Outside help usually covers planning the account setup, running the deployment in a non-production account, reviewing the resources the stack creates, configuring access and secrets, and documenting how the stack is run. DeployOpen plans, implements, hardens, backs up, documents and supports self-hosted open-source platforms in the client's own AWS accounts. Most engagements are fixed-scope, so the included tasks, deliverables and timelines are agreed in writing before work starts. Ask for the list of AWS resources in scope and who is responsible for each one.
How long does the work take, and what changes the timeline?
The timeline depends on how quickly your AWS account can meet the prerequisites, not only on the script run itself. Delays usually come from obtaining admin access through your identity process, approvals for the resources the stack creates, quota limits, domain and certificate setup, and agreeing on which processor credentials are available. The guide warns that the stack launches multiple services that may exceed compute limits on smaller accounts, so a quota check early in the project is one of the most useful steps. Ask any partner to state its assumptions about account readiness and what happens if those assumptions do not hold.
What must our team provide before the deployment starts?
Before work starts, your team should provide:
- An AWS account, with a designated region and the networking choices your security team requires
- An AWS user with admin access for the deployment, ideally with multi-factor authentication and a defined owner
- A domain name and the ability to create DNS records and TLS certificates
- Processor test credentials, if you want to verify payment flows during the deployment
Also confirm who approves the resources and who receives the outputs. Keep the admin credentials out of shared documents and remove or reduce them once the stack is verified.
Is the CloudFormation path production-ready for a payments stack?
The CloudFormation guide is a supported deployment route, but it is not a substitute for your own production review. It deploys the full stack and warns about compute limits on smaller clusters, so production readiness depends on sizing, access control, backups, monitoring, key handling and PCI DSS scope, which the script does not decide for you. Confirm the current guidance on the Hyperswitch documentation site, check the release compatibility matrix for the version you deploy, and compare the result with the go-live checklist for self-hosted Hyperswitch before handling live traffic.
When should we choose Terraform instead of the CloudFormation script?
Choose Terraform when your organization already manages cloud infrastructure with Terraform, needs several environments from one codebase, or wants reusable modules under its own review process. CloudFormation through the CDK script suits teams that want a single guided deployment inside AWS with fewer tools to maintain. Terraform gives more control over shared network, database and key resources and fits better with GitOps workflows. Compare both options against your existing tooling, staffing and change management before committing.
Does the CloudFormation deployment cover upgrades to later Hyperswitch releases?
The deployment gets the stack running, but upgrades are a separate ongoing task. Hyperswitch ships roughly monthly minor releases, and each has a compatibility matrix for Control Center and web client versions. Some releases add required dependencies, such as Superposition in v1.124.0, which must run before you upgrade. Plan who reviews release notes, tests upgrades in a non-production environment and maintains the CDK code after your first deployment.
How DeployOpen scopes and delivers a Hyperswitch AWS deployment
DeployOpen is a Chainscore Labs company that plans, implements, hardens, documents and supports self-hosted open-source platforms inside the client's own cloud accounts. For a Hyperswitch deployment on AWS, that means the CloudFormation stack, the networking, databases, cache and secrets it creates all live in your AWS account, under your ownership and your access controls. Most engagements are fixed-scope, so the boundaries of the work are agreed in writing before any change is made to your environment. That written scope should name the AWS accounts and regions involved, the Hyperswitch components to be deployed, the environments in scope and the handover items you will receive.
The work begins with a readiness review of your accounts, quotas and access. Confirm that the deploying identity has the admin access the CDK script needs and that your security team has approved it, then check service quotas against the number of services the stack launches, since the Hyperswitch guide warns that those services may exceed compute limits on smaller accounts. Also confirm which Node.js and git versions your build hosts run, where the CDK state will be stored, and who approves changes. Findings from this review feed the quote, because a quota increase, a new account or a broader access model each changes the effort and the timeline.
After go-live, DeployOpen delivers handover documentation covering the deployed architecture, the parameters used, the access model, backup and recovery steps and the runbook for upgrades. Ongoing support, upgrades and continuous testing are available as retainers, which suit teams that want the stack kept current against Hyperswitch's monthly minor releases without building that capability themselves. Ask any partner, DeployOpen included, to show exactly what the retainer covers, who holds the AWS credentials after handover and how change records are kept for your auditors.

