Case study 14 · Data and infrastructure
Cutting an AWS bill from $24,000 to $2,000 a month
A national identity authority's AWS bill was inflated by three different kinds of problem, and none of them raised an error. Nothing was decommissioned.
Monthly spend: $24,000 → $2,000
The story in 5 steps
Stack
- AWS
- S3
- Node.js
01 · Context
The first thing I did on the project was read the AWS bill, which came to $24,000 a month.
The first thing I did on the project was read the AWS bill, which came to $24,000 a month. Six months later the same system ran for $2,000 a month.
Nothing was decommissioned, and the product served the same users doing the same work. The saving came from three separate problems: everything was over-provisioned, infinite loops were running, and uploads went through the backend. Each is a different kind of problem and is found a different way, so knowing which kind you have is more useful than the total.
Flexera's 2026 survey of 753 organizations estimates that 29% of cloud spend is wasted, and 85% of those organizations name managing cloud spend as a top challenge. The waste on this project was far larger than 29%: the bill was about eight times what the workload needed.
02 · Could not change
Nothing in the system was broken in a way anyone would notice.
Nothing in the system was broken in a way anyone would notice.
Cloud waste is hard to catch, and it persists, because it breaks nothing. A slow endpoint draws complaints and a failing job raises an alert, but an oversized instance, a runaway loop or a badly placed upload path keeps working normally, month after month, while you pay for it.
Until someone sets up a budget alarm, the only way to find this kind of waste is to go and look at the bill on purpose.
03 · What I did
Over-provisioning. I found the sizing problem by comparing provisioned capacity with observed use.
Over-provisioning. I found the sizing problem by comparing provisioned capacity with observed use. Everything was over-provisioned, including the instances and the database. This is rarely negligence: someone sizes an environment at launch when nobody knows the load, picks generously, and correctly so. Then the load becomes known and nobody goes back to it, because nothing is wrong and something else is always more urgent.
Infinite loops. I found the fault by looking for cost that didn't track traffic. Loops in the system were consuming compute continuously, and somebody had been paying for them month after month without knowing they existed. These were actual infinite loops, not a hot path or an inefficient query. Over-provisioning shows up as low utilization, while a runaway process shows up as high utilization that nobody can attribute to anything a user is doing.
Uploads routed through the backend. I found the architectural cause by reading the code. Uploads went through the backend on their way to S3, when the client could have sent them there directly. Every photograph, whether of a face or of a document, arrived at the server, occupied its memory for the duration of the request and was then pushed onward. In this system every application is an upload, so the upload path was the main path through the product.
Routing uploads through the backend tied instance memory to the number of concurrent uploads, sent every byte across the network twice, and capped throughput at what the application server could handle, although S3 is designed to absorb far more.
No dashboard shows a cause like this one, which is why it tends to be found last, and it is usually the largest of the three.
04 · Result
Monthly spend: $24,000 → $2,000
- Monthly spend: $24,000 → $2,000
- Against what the workload actually needed, the bill was about eight times too large, and the final bill came in lower still, so the cut from $24,000 to $2,000 is twelvefold
- Each of the three causes was found by a different method, and none of them raised an error
05 · Differently
The bill should not have been the developer's discovery.
The bill should not have been the developer's discovery. Nobody was watching it and nothing alerted when it grew. A budget alarm costs nothing and would have caught the infinite loops in their first week rather than their fiftieth.
Related services
The services that draw on this work.
- Cloud and DevOpsCloud cost reviewA national identity system in West Africa had all three kinds of cause, and none of them had produced an error. Within six months its monthly bill went from $24,000 to $2,000, for the same users doing the same work. Against what the workload needed, the bill had been about eight times too large; the final cut was twelvefold.
- Cloud and DevOpsAWS architectureA West African national identity system whose bill for the same workload came down from $24,000 to $2,000 a month, with nothing switched off.
- How we can workTechnical due diligenceA national identity system in West Africa with three causes of excess cost: sizing, a fault and the architecture. None of them showed up as an error, and monthly spend fell from $24,000 to $2,000.
Related writing
Posts that came out of this project.
- 19 OCT 2026 · 4 minTechnical due diligence: read the bill before the codeBefore you buy or fund a product, its cloud bill shows what the system really does. How I read an unfamiliar system, and what the assessment contains.
- 9 APR 2026 · 4 minFrom $24,000 to $2,000 a month on AWS: the three causes I foundOversized instances, infinite loops and uploads through the backend raised no errors for months. How each one shows up, and what to check first on your bill.
- 11 MAR 2026 · 3 minUpload to S3 with a signed URL instead of through your backendFifty concurrent 4 MB uploads through a server hold 200 MB of RAM and cross the network twice. How to sign a five-minute S3 upload URL and check the file later.
Case study 14
Working on a similar problem? We reply within one business day.
The first call takes 30 minutes, and you’re under no obligation.