Deploy on AWS using CloudFormation
Use our CDK script to deploy Hyperswitch into your AWS stack
Steps to Deploy Hyperswitch on AWS
Prerequisites
git
installed on your local machinenode version 18+
An AWS user account with admin access (you can create an account here if you do not have one)
Step 1 - [Optional] - Create a new user with admin access

If you do not have a user with admin access, follow these steps:
1. Sign into the AWS Management Console
In the left-hand menu, click Users
Click the Add users button
2. Set the username
User name:
hyperswitch

3. Attach Permissions
Choose Attach policies directly.
In the search bar, type
AdministratorAccess
Check the box for: 🔐 AdministratorAccess – AWS managed, job function

4. Review and Create
Confirm the details:
User name:
hyperswitch
Permissions:
AdministratorAccess
Click on Create user

5. Save Access Credentials
Click on the newly created user
hyperswitch
to view its details.Navigate to the Security credentials tab.
Under the Access keys section:
Click Create access key
Choose Command Line Interface (CLI))
Click Next, then Create access key
Download the
.csv
file or securely copy the:Access Key ID
Secret Access Key
⚠️ You won’t be able to view the Secret Access Key again later — store it in a password manager or other secure location.
Step 2 - Configure your AWS credentials in your terminal
For this step you would need the following from your AWS account
Preferred AWS region
Access key ID
Secret Access Key
Session Token (if you MFA set up)
Once you have the keys run the below command
Step 3 - Deploy Hyperswitch application
Run the below commands in the same terminal session
Once the script is run you will have to provide the following as inputs:
Create a DB password of your choice (should be more than 8 chars).
Provide an Admin API key of your choosing via Hyperswitch Dashboard.
If you choose to opt-in for the card vault service, provide a master-key when prompted (command to generate the master-key will be displayed on the terminal; also note down the two custodian keys to start the locker)
Provide the Locker DB password of your choice when prompted
After the deployment is completed, use the custodian keys to activate the locker (You can find the cURLs here). The host URL of the locker to run these cURLs will be displayed on terminal.
Make sure to save the passwords you provide while running the script.
Output
On successful execution of the script, you will receive the following outputs
Hostname of the app server
Access the application's APIs using the given base URL
Hostname of the log server
View real-time logs for all processes
Control Center URL
Access the Hyperswitch control center and explore multiple settings
Hyperloader.js URL
Use the hyperloader
to integrate our web client in your website
Demo App URL
Test payments quickly using our web checkout in the demo store
Locker URL
Access the Hyperswitch card vault using this host URL
That's it! Hyperswitch should be up and running on your AWS account. Open the Demo Store and make a test transaction using any test card 🎉🎉
Estimated cost of running the above setup
The table below offers an estimated cost for operating the setup generated by the CDK script within your AWS environment. This cost is computed under the following assumptions:
The system is handling a traffic of 1000 transactions per day
The number of hours per month for each component is 720 (24*30)
EKS
1 cluster
-
73
EC2
3 x t3.medium
-
45.11
Aurora Postgresql
1 x t3.medium
500 MB * ( 0.05 USD) Assuming 30k transactions per month
0.07 USD **
(3 baseline i/o per minute, 9 peak i/o per minute)
59.98
(59.86 + 0.05 + 0.07)
ElastiCache
1 x t3.micro
-
12.24
S3
1
1 GB
0.24 ***
(290 GB outbound data transfer assuming 1000 new user logins per day)
1.14
Load Balancer
4
-
65.72
Total
257.19
*Avg data written per transaction = 16 kb
**Assuming 3.5k API requests per day with 5 i/o operations each and 18 hours peak time per day
***Assuming 30 GET requests per login. Avg new user would receive 10 mb data per request. For 1000 new logins the data transfer = (10*30*1000*) / 1024 ~ 290 GB
Tear down the AWS Deployment
You'll need to destroy the Hyperswitch CDK Stack. To tear down all AWS resources provisioned by the Hyperswitch CDK stack, run the following command. This ensures the required aws_arn
context is passed during the destroy process:
You’ll be prompted to confirm the deletion. Type y
when prompted to proceed.
💡 This command removes all infrastructure created by the CDK, including EKS clusters, VPCs, IAM roles, and other resources.
You can check to see if there is anything running:
If the CDK Toolkit exist, you can execute this command:
What you deployed in this tutorial
The following components and services were provisioned as part of a new stack in your AWS account:
EKS (1 Cluster)
t3.medium
2 Nodes
Load Balancer
Application LB
2 LBs
RDS
t4g.medium
2 cluster
ElastiCache
t4g.medium
1 cluster
EC2
t3.medium
1 instance
The following services are installed in the 2 Nodes across the EKS cluster
Hyperswitch App Server
3 pods
CPU : 400m Memory : 500 Mi
Producer (Scheduler)
1 pod
CPU : 100m Memory : 100 Mi
Consumer (Scheduler)
1 pods
CPU : 100m Memory : 100 Mi
Promtail
Daemon Set (will be deployed in every node)
CPU : 200m Memory : 128 Mi
Loki
1 pod
CPU : 100m Memory : 128 Mi
Grafana
1 pod
CPU : 100m Memory : 128 Mi
Control Center
1 pod
CPU : 100m Memory : 100 Mi
Hyperswitch Demo Store
1 pod
CPU : 100m Memory : 100 Mi
Architecture Diagram

Next step:
Account setupTry a PaymentExplore Further
Once you are done with the test payment, you can explore more about these:
Last updated
Was this helpful?