Executive Summary
1 min summary
Most cloud bills grow faster than revenue because temporary scaling bumps, production-sized non-prod environments, unindexed queries, and neglected logging accumulate quietly over years. Across payment and cloud platforms, tracing the top five to ten billing items back to actual workloads has delivered 50 to 85% infrastructure cost reductions without risky re-platforming. Lasting savings depend on fixing the underlying architecture or sizing choices and leaving clear runbooks and cost alerts so the bill does not creep back up six months later.
A six-figure AWS or GCP invoice rarely jumps overnight. It creeps upward quarter after quarter while revenue grows slower, leaving engineering leaders with a quiet suspicion that they are paying for far more infrastructure than their traffic justifies.
Nobody touches it for two reasons. First, the engineering team assumes cutting the bill meaningfully requires a six-month re-platforming, moving off managed services, or migrating to another cloud provider. Second, when the platform processes live payments or carries a 99.99% uptime target, nobody wants to be the person who downsized a cluster and caused a Friday afternoon outage.
So the bill keeps climbing. A database gets bumped two tiers up during an incident and never gets scaled back down. A staging environment gets cloned from production for a load test and stays running for a year. Debug logs stay turned on after a tough debugging week.
Across payment and cloud engagements where we cut infrastructure spend by 50 to 85%, we never rewrote the stack and we never switched cloud providers. Almost all of the savings came from tracing the top five or ten lines on the invoice back to concrete architectural and operational habits.
Two Very Different Ways a Cloud Bill Gets Cut in Half (or More)
Big savings do not always look the same. Two engagements from my own work illustrate opposite ends of the problem.
Cutting 85% on a 99.99% Multi-Region Payment Gateway
On an enterprise payment platform running multi-region microservices on AWS, downtime carried direct revenue and regulatory impact. Because reliability came first, teams erred on the side of caution everywhere: generous compute headroom across regions, non-production environments sized close to production, and legacy infrastructure pieces left behind after migrations.
One of the biggest leaks was even simpler: any developer could spin up their own EKS cluster to run tests, and those clusters routinely stayed running for weeks after the tests finished, burning compute around the clock while sitting completely idle. Nobody had maliciously wasted money; every setup decision had made sense in isolation under delivery pressure.
The billing audit separated zero-risk cleanup from production sizing work so the platform kept its 99.99%+ availability profile throughout:
| Cost Driver (Illustrative Sequence) | What Was Burning Budget | Execution Risk | Guardrail Left Behind |
|---|---|---|---|
| Ad-hoc developer EKS clusters | Idle test clusters running 24/7 for weeks | None (dev only) | TTL auto-teardown + owner tags |
| Non-prod & retired migration infra | Production-sized staging + leftover legacy nodes | Low | Business-hours schedules + decommission checklist |
| Multi-region compute headroom | Static over-provisioning across regions | Medium (load-tested) | Traffic-curve baselines + rollback runbook |
| Network, logs, and storage drift | Unbounded retention + cross-AZ transfer | Low to Medium | Retention caps + anomaly alerts |
Pairing the raw billing breakdown with real traffic curves gave us a targeted plan that cut infrastructure spend by 85% while holding the same 99.99%+ availability profile.
Just as important as the changes themselves was what we left behind: architectural baselines and step-by-step rollback runbooks. Without written guardrails, the first engineer who hits a traffic spike six months later will double the instance sizes again “just to be safe.”
Cutting 50% by Moving To Managed Cloud Services
The second case runs counter to the usual advice you hear on Hacker News, where self-managed servers are always assumed to be cheaper than managed cloud services.
On a hospitality payments platform, the company had been running self-managed infrastructure and databases. On paper, raw virtual machines looked inexpensive. In reality, they were over-provisioning servers for manual failover headroom and burning senior engineering hours on patching, backups, scaling emergencies, and on-call babysitting.
During the platform redesign into event-driven Kotlin microservices, we moved onto managed AWS services (RDS, DocumentDB, and ECS). Customer-facing payment paths stayed warm while asynchronous workers, scheduled jobs, and internal services scaled down to zero during quiet periods, cutting idle compute straight off the bill.
Hosting spend dropped by 50%, on-call load dropped right alongside it, and the rebuilt platform went on to handle ten times the transaction volume without another re-architecture.
Rule of thumb: Compare total cost honestly. A “cheap” self-managed database cluster that needs oversized nodes for safety and costs half an engineer’s week in maintenance is usually more expensive than a right-sized managed service.
Five Places Where Most of the Waste Hides
When you open an AWS or GCP bill for a platform that has been shipping fast for two or three years, the noise spreads across dozens of services. The real money usually sits in five places.
1. Non-Production Environments Running at Production Scale
Staging, QA, UAT, and feature-branch environments frequently mirror production instance types, multi-AZ databases, and replica counts while handling less than one percent of the traffic. Even worse, they sit idle nights and weekends.
Right-sizing non-prod instances, collapsing redundant test environments, and putting dev/staging clusters on a simple business-hours schedule regularly knocks 15 to 25% off a mid-sized company’s total bill in the first week, with zero risk to paying customers.
2. Databases Masking Missing Indexes and Chatty Queries
Whenever response times creep up under load, upgrading the database instance takes ten minutes and makes the alert go away. Fixing the underlying query takes a sprint. Over a couple of years, companies end up paying thousands a month for an oversized RDS instance whose CPU is spent scanning tables that are missing two composite indexes, or serving an N+1 loop behind a cache with a poor hit rate.
Before touching instance families or buying reserved capacity, pull pg_stat_statements (or your database’s equivalent top-query report) and line it up next to CPU and IOPS graphs:
-- Top 10 total-time queries in PostgreSQL 13+ before resizing RDS
SELECT calls,
round(total_exec_time::numeric, 1) AS total_ms,
round(mean_exec_time::numeric, 2) AS mean_ms,
shared_blks_read,
left(query, 100) AS query_sample
FROM pg_stat_statements
ORDER BY total_exec_time DESC
LIMIT 10;
Fixing three hot queries often lets you drop two instance sizes safely. The same principle applies in application compute: in Deep Tracks, changing how grid data was represented in memory kept a Java workload on a single fixed machine instead of throwing more hardware at the heap.
3. Compute Sized for 2% of the Week
Payment batches, end-of-month invoicing, and regional business-hour spikes create sharp traffic peaks. If synchronous services are statically sized to absorb the Friday evening peak all week long, you are paying for idle CPU 95% of the time.
Decoupling spiky ingestion or heavy downstream work through queues (SQS, Kafka, or a transactional outbox) flattens the compute profile. Workers scale out when the queue fills and scale down when it drains, and user-facing APIs stop needing huge connection pools to survive downstream slowness.
4. Invisible Network, Storage, and Logging Taxes
Cloud bills love quiet line items that nobody gets paged for:
- NAT Gateways and cross-AZ data transfer: Chatty microservices talking across availability zones or pulling container images and S3 objects through a NAT Gateway instead of VPC endpoints can quietly cost as much as the compute itself.
- Unbounded logs and retention: Verbose
DEBUGor full payload logging pushed into CloudWatch or Datadog with infinite retention, plus unpruned audit or event tables sitting on expensiveio1/io2PIOPS or oversized RDS storage. - Orphaned resources: Unattached EBS volumes, ancient snapshots, idle load balancers, and old elastic IPs left behind by services retired a year ago.
5. Buying Expensive Third-Party Tools to Paper Over Gaps
Sometimes the biggest infrastructure saving is the contract you decide not to sign. On the same enterprise payment platform where we cut AWS spend, the team was evaluating a pricey third-party transaction monitoring vendor. After laying out the real domain requirements, it turned out the vendor still could not give us the payment-specific visibility we needed without heavy workarounds. Extending the existing in-house monitoring cost a fraction of the license fee, gave better visibility, and avoided adding another external dependency to the critical path.
Knowing where leaks hide is half the battle. Turning an invoice into safe production changes without triggering a Friday outage takes a strict order of operations.
How to Run a Cost Hunt in Two to Three Weeks
Good cost work follows the invoice, then the code. You do not start by asking every team to “save 10%.” That produces weeks of bike-shedding over €40 items while the two €12,000 leaks stay untouched.
Here is the decision sequence I run during a fixed-scope Cloud & Performance Cost-Hunt:
- Sort the bill and isolate the top 5 to 10 line items. Five to ten SKUs almost always represent 75 to 85% of total spend. Everything below that waits until round two.
- Overlay utilization and traffic curves. Pair AWS Cost Explorer (or GCP Billing export) with CPU/memory curves,
pg_stat_statements, and hourly queue depth to separate constant baseline load from spiky peaks. - Run every top line through a three-question filter, in order:
- Can we delete it outright? (Zero-traffic leftovers and forgotten environments first.)
- Is a code or query fix cheaper than the hardware? (Fix the workload before resizing the box.)
- Does the pricing model fit the traffic shape? (Right-size and schedule first; commit to Savings Plans or Reserved Instances only after right-sizing.)
- Ship zero-risk wins first, then load-test production cuts. Non-prod schedules, VPC endpoints, and retention caps ship in days with zero customer impact. Production database and compute changes move only after load validation and staged rollout.
Watch out for two traps during cost work: buying 1- or 3-year Savings Plans before right-sizing (locking in existing waste at a discount), and trimming multi-AZ or regional failover headroom without verifying that the surviving zone absorbs peak load cleanly.
What keeps savings alive: Every optimization needs a short runbook explaining why a resource is sized the way it is, what metrics justify scaling it back up, and an automated cost anomaly alert. Without guardrails, cloud bills drift back toward their old baseline within two quarters.
When Not to Spend Time on Cost Optimization
Chasing cloud savings at the wrong stage is a distraction:
- Pre-product-market fit: If your monthly bill is €1,500 and you have four engineers fighting for your first paying customers, leave it alone and ship product.
- When engineering time exceeds the payback: Paying two senior engineers for a month to shave €600 off a monthly bill is negative ROI.
- Right before a broader architectural review: If you are already planning a 2-week architecture review ahead of a migration or scaling push, roll the top billing lines straight into that diagnostic instead of optimizing infrastructure you plan to retire next quarter.
If your bill is already outpacing revenue, you do not need a six-month migration pitch or a risky Friday downsizing to find where the money is going. Run three zero-risk checks on Monday afternoon:
- Export the top 10 Cost Explorer or GCP Billing SKUs from the last 30 days and assign each line an engineering owner.
- Run the
pg_stat_statementstop-query report against your primary database before approving the next instance upgrade. - List every non-production cluster or database running 24/7 with near-zero weekend traffic and put it on a business-hours schedule with TTL cleanup.
Cloud bill climbing faster than revenue? Explore our fixed-scope Cloud & Performance Cost-Hunt, run our AWS & GCP Cost-Hunt pre-audit signals on GitHub, or share one billing or latency bottleneck via the contact form for three candid observations within 48 hours.