Armakuni Contact us
← All case studies

AWS platform modernization for a card processing platform

A card payments processor runs card transactions through its payment gateway on AWS. A Windows Server 2016 end-of-support deadline exposed a wider problem across an estate that had grown without a plan. Armakuni is delivering a five-workstream modernization programme: moving the Windows workloads onto Amazon ECS with Fargate, replacing manual database sharding with partitioning, separating development from production under AWS Control Tower governance, and building a module that provisions a fully governed AWS account in a single run.

Before

The challenge.

After
5–10×faster refund and void lookups, at every memory size tested
0queries over ten seconds in the recommended design, against 7

The challenge

The company runs card processing through its payment gateway. A card is presented at a merchant terminal, the transaction reaches the gateway, it is passed on for authorisation, and the answer comes back before the customer has put their card away. That happens several times a second, all day, across 1.34 billion transactions and 9.74 TB in the transaction store.

The platform behind it works, and has worked for years. The way it is operated had not kept pace with it. When the Windows Server 2016 end-of-support deadline arrived, four problems surfaced at once.

Forty-three servers were being patched in place, by hand. They ran every application tier plus the directory services behind them. Each application has two permanently running server groups, a live side and a standby side, with updates rolled out to one side at a time and promotion done by a person running a script. There was no audit trail, no gradual rollout, and no way to automatically abandon a bad deployment.

The system that provisioned those servers was running without a vendor. OS hardening, directory integration, monitoring agents and the scripts that bootstrap each application at startup were all managed through a legacy configuration management system. It had been operated in partnership with a third-party provider, and that relationship had ended. An internal plan to retire it already existed and had not been carried out.

Database capacity was added by a person with a laptop. When a database approached its limit, alerts fired, first a warning and then an urgent tier. An operator then ran a desktop application locally, connected directly to production, entered a cluster and database name and a range of transaction numbers, and clicked three buttons. No pipeline, no review step. It had worked for nine years, and it scaled only by doing more of the same.

Development and production shared the same accounts, and there was no QA tier. Development resources sat inside the production accounts, so a mistake made in development had a path to the environment processing live card transactions. It also meant that when a PCI DSS or SOC 2 auditor asked to see the boundary between the two, there was none to show them.

Scale: An 82-account AWS estate, 43 Windows Server 2016 instances, and a transaction store of 1.34 billion transactions and 9.74 TB across three Aurora clusters, under PCI DSS 4.0.1 and SOC 2.

How we built it

5 decisions, in the order we made them. Each one says what we did and why, and what it was built with.

  1. Phase 1: Discovery
  2. Phase 2: Moving the Windows workloads to containers
  3. Phase 3: From manual shards to partitioning
  4. Phase 4: Separating development from production
  5. Phase 5: A QA tier that provisions itself

Phase 1: Discovery

Built withTerraform
The engineering

Armakuni did not start by building anything.

The team reviewed the codebase and the live environment together, covering the technology stack, the deployment model for the production fleet, and the three applications closest to modernization: the payment gateway, the customer portal, and the batch upload service. They inventoried the infrastructure-as-code and found it spread across Terraform, CloudFormation and the legacy configuration system. Three tools with overlapping responsibility is a finding in itself.

Discovery found a larger platform than the documentation described. Close to 90 confirmed production serverless services were running across five different compute models, which told the team something useful: the company was already comfortable operating a mix of hosting models, so a phased, application-by-application migration would fit how the platform already worked.

It also found around 30 places in the codebase assuming they were always running against the primary production account, covering credential paths, encryption keys, storage locations and a few database endpoints. That one root cause is the main technical blocker to standing up any new environment cleanly, which is why parameterising it comes before the account separation rather than after.

Phase 2: Moving the Windows workloads to containers

Built withElastic BeanstalkEKSECSFargateLambdaSQS
The engineering

The Windows deadline was the one date the company did not control, so this went first.

The obvious route was to rebuild all 43 instances on a newer version of Windows Server. Discovery pointed somewhere better, and the options were narrowed on evidence rather than preference. AWS App Runner was ruled out because it does not support Windows containers. Elastic Beanstalk was set aside because it would still leave persistent virtual machines to manage and would change who ran the servers rather than removing them. Amazon EKS was judged more operational overhead than the platform's scale justified.

That left containerising the applications as they are and running them on Amazon ECS with AWS Fargate. Armakuni built it rather than proposing it. The gateway was containerised using its existing build process, with only the packaging step changed, and deployed to Fargate in an isolated non-production account behind an Application Load Balancer against a real database. The portal followed the same approach. The batch upload service, which ran as a single always-on process kept alive by a scheduled task, moved to AWS Lambda triggered by Amazon SQS, reusing the existing processing logic and replacing only the hand-built polling loop.

One routing problem needed a second attempt. Certain gateway endpoints still have to reach a separately hosted Lambda in another account. A direct proxy worked mechanically but broke the gateway's origin-trust security control, because forwarding replaced the original caller's address with the proxy's own. Armakuni replaced it with an Amazon CloudFront distribution carrying two origins, default traffic to the ECS-hosted gateway and a specific path pattern to the cross-account Lambda. That preserves the caller's address, so the existing security control is satisfied by design rather than worked around.

The trade-off was called out rather than buried. Windows containers on Fargate start slower than Linux ones, and a new task can take a minute or more to become ready. The plan accounts for it directly: scaling out at a lower utilisation threshold, holding a higher minimum task count, and adding scheduled scaling ahead of known peaks.

Phase 3: From manual shards to partitioning

Built withAurora
The engineering

Three Aurora clusters hold 33 databases, 1.34 billion transactions and 9.74 TB. Armakuni designed the partitioning model to replace the manual sharding, and made one structural recommendation: organise the new table by transaction number rather than by date.

That recommendation does not rest on performance. It rests on a fact about the schema. The primary key on the transaction number is the table's only unique key. Organising by date forces that key to change, and the database stops guaranteeing that a transaction number is unique.

The benchmarks then confirmed it. Armakuni built two complete databases with identical 124-column tables, identical 17 indexes and 60 sections each, 68 million transactions in total, with the only variable being how the table was divided. Synthetic data was matched to the production profile and verified against it rather than trusted. No production data was copied.

The cutover design moves nothing. The partitioned cluster takes new transactions while the 33 existing databases continue serving reads until their data ages out. Going live means registering one more entry in the routing registry and pointing a single account group at it, with no application code change and no downtime window. Reversal is the same single edit that enabled it. The design is complete and with the client for approval.

Phase 4: Separating development from production

Built withControl TowerIAM Identity Center
The engineering

Armakuni designed a multi-account structure on AWS Organizations and AWS Control Tower that takes development resources out of the production accounts. The migration is scheduled.

The PCI DSS 4.0.1 and SOC 2 guardrails sit at the organisation level rather than being configured account by account. That matters later, because it means the controls hold for accounts that do not exist yet.

Developer access moves to AWS IAM Identity Center, with permission sets attached to OUs rather than to individual accounts, so granting or revoking access becomes one action instead of many.

The migration itself is the delicate part. Dependent services, networking, Transit Gateway routes and IAM integrations all have to move while the account they are leaving is still processing payments.

Phase 5: A QA tier that provisions itself

Built withTerraformControl TowerIAM Identity CenterCloudTrailGuardDutySecurity Hub
The engineering

Building that many QA accounts by hand would take months, and they would drift apart from each other almost immediately. Armakuni designed a parameterised Terraform module integrated with AWS Control Tower instead. The build is scheduled.

The module creates an account, attaches it to the correct OU, and applies everything it needs before anyone logs in:

  • Baseline VPC, subnets and route tables to the company's networking standard
  • IAM Identity Center permission sets giving QA full access inside their own environment and read-only everywhere else
  • Service Control Policies enforcing region restrictions, instance sizing caps, cost controls, and complete isolation from production, with no production data, access or copies
  • CloudTrail, Config, GuardDuty and Security Hub with foundational security standards, reporting into the central logging and audit accounts
  • Naming conventions and mandatory tagging policies

Two pilot accounts go first, proving the module against real workloads before it is trusted with the rest. Counterparts for the remaining production accounts follow in waves grouped by complexity, with synthetic data seeded for the microservice data stores.

The engagement closes with a handover rather than a dependency: module source, pipeline configuration, a runbook covering the guardrail model and the QA data refresh procedure, and knowledge-transfer sessions for the cloud engineering and QA teams.

Built on AWS

Armakuni works inside AWS accounts that remain under the company's ownership, through company-provided AWS Workspaces, with every assigned engineer holding PCI compliance training certification recorded for the company's audit evidence.

Governance and identity. AWS Organizations and AWS Control Tower for the account structure, Service Control Policies for region, sizing, cost and isolation controls, and AWS IAM Identity Center for OU-based access.

Compute. Amazon ECS with AWS Fargate hosting the containerised gateway and portal applications, AWS Lambda running the batch upload service through Amazon SQS, and Amazon EC2 across the fleet being replaced.

Data. Amazon Aurora MySQL across three clusters for payment transactions, Amazon Redshift fed by AWS DMS and AWS Glue for the existing data warehouse, and Amazon S3 for application storage.

Networking. Amazon CloudFront routing a single public domain across two origins, Elastic Load Balancing in front of the container services, Amazon VPC, and AWS Transit Gateway.

Security and audit. Amazon CloudWatch Logs, Amazon GuardDuty including Runtime Monitoring as the container file-integrity detection layer, AWS CloudTrail, AWS Config and AWS Security Hub, reporting into the central logging and audit accounts.

Automation. Terraform defining networking, load balancing, the container cluster and the service definitions, deployable through an automated pipeline, replacing a legacy configuration management system left without a vendor.

Competency: AWS Managed Service Provider (MSP)

Tech stack: Amazon ECS, AWS Fargate, AWS Lambda, Amazon SQS, Amazon EC2, Amazon Aurora MySQL, Amazon Redshift, AWS DMS, AWS Glue, Amazon S3, Amazon CloudFront, Elastic Load Balancing, Amazon VPC, AWS Transit Gateway, AWS Organizations, AWS Control Tower, AWS IAM Identity Center, AWS Directory Service, Amazon CloudWatch, Amazon GuardDuty, AWS CloudTrail, AWS Config, AWS Security Hub, Terraform

What else changed

  • The migration approach is proven, not proposed. Gateway and portal both came up on ECS Fargate against a real database, the batch upload service ran on Lambda through SQS, and cross-account routing was verified live through a single public domain. The company is deciding on the basis of working deployments rather than a document.
  • No application rewrite is needed. None of the three applications reviewed has an architectural blocker to containerisation. The gateway holds no browser session state in server memory, has no Windows-only integration dependencies, and hardcodes no file paths. The existing build process was reused with only its packaging step changed.
  • Compliance gaps were found before production rather than during an audit. Application log retention was set to seven days against a PCI requirement of a year. The file-integrity monitoring agent used on the current fleet cannot be installed on Fargate, so a replacement approach was designed as one platform-wide decision rather than solved three times over. Both were raised with the compliance owner early, because they change how an existing control is evidenced rather than whether it is met.
  • The laptop is coming out of the capacity process. A scheduled job creates new sections ahead of demand, records each day's transaction number range, and alarms if anything lands in the catch-all section, which is the one failure that would otherwise be silent. It replaces a desktop application connected directly to production.
  • Infrastructure is becoming code, and the legacy configuration system is shrinking. Networking, load balancing, the container cluster and the service definitions for gateway and portal are defined in Terraform and deployable through an automated pipeline in non-production, with the same code reused to provision production. Every application that migrates removes another responsibility from the configuration system the company has been running without a vendor.

Have a problem like this one?

A free workshop: a few hours with the architects who'd do the work, on your own systems. No cost.

Book a free workshop