Back to blog
infrastructure
cloud
case-study
cost-optimisation
devops

90% infrastructure cost reduction — a three-stage story

How I reduced monthly cloud spend from ~$4,000 to under $400 across three roles at the same company — starting as a developer and finishing as CTO.

Salem Aljebaly
Company
Lamah Co
Timeline
Oct 2020 – Present
Roles
Engineer → Head of Dev → CTO
Cloud cost
~$4,000 → <$400 /month
Recovery time
Hours → <30 min RTO
API performance
20s → ~1s response

The problem evolved as my role did

Most cost-reduction stories are one event. This one happened in three distinct phases — each unlocking the next. I wasn't handed a mandate to fix infrastructure on day one. I noticed the waste, fixed what I could from my position, and built the case to go further as my responsibilities grew.


Phase 1 — Software Engineer: find the obvious waste

When I joined as a developer, I wasn't responsible for infrastructure. But I could see it. Unused resources billing month after month. Workloads that could run cheaper with small configuration changes. No one was looking at the bill closely.

I started documenting what I found and making targeted fixes where I had access. Result: ~45% reduction in monthly spend — without changing the architecture, just eliminating waste and right-sizing what was already running.

That work built credibility. It also revealed how deep the problem went.


Phase 2 — Head of Development: governance and automation

Promoted to lead a team of 10–14 engineers across mobile, backend, and infrastructure. Now I had authority to change how we operated, not just report on it.

The focus shifted from cutting waste to building systems that prevented waste from accumulating:

  • Introduced CI/CD automation with self-hosted runners, eliminating a significant portion of external CI costs
  • Established cost visibility dashboards — the team could now see what each environment was spending in real time
  • Implemented early IaC practices so infrastructure changes were reviewed, not clicked

Result: spend reduced from ~$2,200/month to ~$1,450/month. More importantly, costs stopped growing as the product scaled.


Phase 3 — CTO: full architecture redesign

With full authority over infrastructure strategy, I could tackle the root cause: the architecture itself was built for convenience, not cost or reliability.

The redesign covered three areas:

Provider strategy — not everything needs to run on the same cloud. Moved appropriate workloads to Hetzner (significantly cheaper for compute-heavy, latency-tolerant services), kept AWS where it earned its cost, and added Cloudflare at the edge.

Kubernetes and IaC — replaced ad-hoc server management with Kubernetes-based deployments and fully reproducible Terraform-defined infrastructure. Any environment could be torn down and rebuilt from code.

Disaster recovery — designed and validated automated recovery workflows. Tested RTO repeatedly until it consistently came in under 30 minutes. Prior to this, recovery was unscripted and could take hours.

Bonus outcome — while rebuilding the data and API layer, identified a query and caching issue reducing a core API response time from 20 seconds to approximately 1 second.

Result: spend reduced from ~$1,450/month to under $400/month.


Full picture

PhaseRoleMonthly spendChange
StartDeveloper~$4,000
Phase 1Software Engineer~$2,200−45%
Phase 2Head of Development~$1,450−34%
Phase 3CTO<$400−72%
Total−90%+

The 90% headline is accurate. But the more useful number is the trajectory — each phase required a different kind of work, a different level of authority, and a different set of tools.


What transferred to consulting

This experience shaped how I approach infrastructure work for other teams. Cost problems are almost never just technical — they're visibility problems, governance problems, and sometimes organisational problems. The fix usually starts with understanding what you're running and why, before touching anything.

If your infrastructure bill is climbing or your recovery procedures live in someone's head, let's talk.