From a vulnerable legacy server to a modern, secure system on AWS in 12 days

In late October and early November 2026, a financial services client's ageing CRM was secured, upgraded and moved to production on AWS. This is what I did, in what order, and how I checked it.

The situation

The client ran an ageing CRM on a legacy server: PHP 5.6, Lumen 5.0 and MySQL 5.6. That stack was vulnerable: two critical PHP vulnerabilities were announced against it, and that critical PHP security advisory was the trigger for the urgent upgrade and migration. I contained the legacy server first and then moved the system. The work started in late October 2026 and cut over to AWS in early November 2026, twelve days later.

What I did first (contain)

The first priority was to reduce exposure on the legacy server. I mitigated the vulnerabilities there before the migration was finished, and I hardened the legacy server while the migration ran.

The upgrade and how it was proven

The application moved from PHP 5.6, Lumen 5.0 and MySQL 5.6 to PHP 8.3, Laravel 11 and MySQL 8.4 on Amazon RDS. An upgrade across that many versions is only safe if you can show the behaviour did not change, so I checked it two ways:

  • Behaviour scenarios. 246 scenarios were run on both PHP versions. 238 gave identical results, and the other 8 were fixed.
  • Real history. I replayed 12 closed months of payment runs, old system against new. All twelve matched.

The two checks answer different questions. The scenarios cover the cases I thought to test. The replay covers what real payment runs actually did, which a list of scenarios cannot enumerate.

Key staff tested the new application for three days and gave invaluable feedback on what was broken. The issues they raised were fixed, and they retested them before cutover.

The AWS build

Production runs on ECS Fargate, with the web service and 27 scheduled jobs. Around it are an Application Load Balancer, ECR, RDS, EFS, S3, KMS, AWS Backup with S3 Object Lock (backups kept for 7 years), CloudWatch alarms, and Cloudflare in front.

All of it is Terraform, applied through GitHub Actions, so the environment is defined in code and changes go through the pipeline. The final data load was 173 tables and 12.5 million rows, with a fidelity check.

Stats

GitHub tracked the work. These counts cover the infrastructure and application repositories, from 22 October to cutover on 3 November 2026:

  • Issues. 252 opened and 171 closed.
  • Pull requests. 226 merged.
  • Infrastructure code. About 13,500 lines of Terraform at cutover.
  • Application code. About 118,000 lines of PHP in the production application, excluding third-party packages, moved to PHP 8.3 and Laravel 11.

Cutover issues

I would rather name the issues than hide them:

  • An IPv6 login issue appeared the same night. It was fixed after a Cloudflare stopgap.
  • A handful of bugs caused by the migration were found on day one and on day seven after cutover and were fixed with hotfixes the same day.

How the work was done

I worked hands-on with Claude Code. The first task was to set up a work-room and an automated PR review, using the Agent work kit. I have written up how that setup works in how I run client work with Claude Code.

I ran several sessions in the room, each focused on one area, including one on the AWS infrastructure and one on the PHP code upgrade.

Whenever possible I let the Claude agents keep working overnight, after I had answered everything that needed me.

This way I used Claude as my engineering team. I did not have to learn PHP to complete this work.

I used a Claude Team Premium seat provided by the client. That subscription was more than enough for this work, thanks to the efficient agent setup in the work-room: Sonnet 5.5 as the orchestrator, Opus 5.5 as the advisor, and Haiku 5.5 workers.

If this sounds like your platform

If you are facing a similar move with an ageing platform, the same order applies: contain first, prove behaviour, then move. I would be glad to talk. Start a conversation through the contact form, or connect on LinkedIn. More about how I work as a hands-on fractional CTO in Sydney.