Cloud bills don't grow because you're scaling — they grow because you're idle
The surprising truth about most cloud bills is that the biggest line items are often things doing *nothing*. Idle dev environments left running over the weekend. A staging cluster sized like production. A NAT gateway shuffling traffic you forgot about. Snapshots from 2023. Cost optimization for developers isn't about heroic re-architecture — it's about killing structural waste.
This is a practical playbook, ordered roughly by effort-to-savings ratio.
1. Turn off what you're not using
The single highest-ROI move: stop paying for idle.
- Schedule non-prod environments off-hours. A dev cluster running 24/7 costs ~4.5x what it would running only business hours (≈40 of 168 weekly hours). Auto-stop nights and weekends.
- Scale-to-zero idle services. Event-driven autoscaling (KEDA) lets services drop to zero replicas when there's no traffic. You pay for compute only when work exists.
- Delete orphans. Unattached volumes, old snapshots, idle load balancers, and stale static IPs quietly accrue. Sweep them monthly.
2. Right-size before you reserve
Reserved instances and savings plans are great — but only after you know your real usage. Buying a 1-year commitment on an oversized instance just locks in the waste.
- 1Pull actual CPU/memory utilization for a few weeks.
- 2If p95 CPU is under ~40%, you're probably over-provisioned.
- 3Right-size down, *then* commit to a reservation on the corrected baseline.
A common anti-pattern: "we picked an instance size at launch and never revisited it." Revisit it quarterly.
3. Understand the pricing models
| Model | Discount vs on-demand | Catch | Best for |
|---|---|---|---|
| On-demand | baseline | most expensive | spiky/unknown workloads |
| Spot / preemptible | large (often 60–90%) | can be reclaimed anytime | stateless, fault-tolerant, batch |
| Reserved / committed | moderate–large | 1–3 yr commitment | steady baseline load |
| Savings plans | moderate–large | commit to $/hr spend | mixed, predictable spend |
Don't quote exact percentages to your finance team without checking the provider's current pricing page — the discount tiers move. The *shape* of the trade-off is what matters: commitment buys discount, flexibility costs money, interruptibility is cheap.
4. Spot/preemptible for the right workloads
Spot instances can cut compute cost dramatically because the cloud sells spare capacity that it can reclaim with little notice. The rule: use them for anything that tolerates a node disappearing.
Good candidates:
- Stateless web/app servers behind a load balancer.
- Batch jobs and CI runners (retry on interruption).
- Free-tier / dev workloads where occasional restart is fine.
Bad candidates: a single-replica stateful database, or a long job with no checkpointing.
We lean on this heavily: PandaStack runs free-tier apps on spot/preemptible nodes plus KEDA scale-to-zero, inside gVisor sandboxes. The interruptibility and scale-to-zero are exactly what let us offer a free tier — the workload class tolerates a cold start or reschedule.
5. Watch egress like a hawk
Data transfer is the cost nobody budgets for. Ingress is usually free; egress is not, and cross-AZ/cross-region traffic adds up fast.
- Keep chatty services in the same zone/region.
- Put a CDN in front of static assets so origin egress drops to near-zero for cached content.
- Avoid pulling large datasets across regions repeatedly — cache or co-locate.
- Beware NAT gateway data-processing charges for outbound traffic from private subnets.
6. Storage tiering and lifecycle
Not all data deserves hot storage.
- Move logs and backups older than N days to infrequent-access / archive tiers.
- Set object-storage lifecycle rules to expire or transition automatically.
- Compress and dedupe backups; don't keep 90 days of nightly full snapshots when incrementals suffice.
# Example: an S3 lifecycle rule (JSON) to archive then expire logs
# transition to cheaper storage after 30d, delete after 365d
{
"Rules": [{
"ID": "log-lifecycle",
"Filter": { "Prefix": "logs/" },
"Status": "Enabled",
"Transitions": [{ "Days": 30, "StorageClass": "GLACIER" }],
"Expiration": { "Days": 365 }
}]
}7. Make cost visible
You can't optimize what you can't see. The cultural fix matters as much as the technical one:
- Tag everything (team, environment, service). Untagged spend is unaccountable spend.
- Set budgets and alerts so a runaway resource pings you in hours, not at month-end.
- Show cost in dashboards developers actually look at, not just a finance spreadsheet.
FinOps as a discipline is mostly this: tie spend to teams, surface it continuously, and review.
8. Prefer platforms that price by usage
Managing all of the above is real work. One legitimate strategy is to push it down to a platform that already does spot scheduling, scale-to-zero, CDN caching, and right-sizing for you, and charges a predictable plan price instead of a sprawling bill of dozens of metered line items.
That's a core PandaStack design choice: predictable plans (Free $0, Pro $15/mo, Premium $25/mo, Enterprise custom) rather than a surprise invoice. Compute tiers run from Free (0.25 CPU/512MB at $0/hr) up to C2-2XCompute (8 CPU/16GB at ~$0.300/hr ≈ $219/mo), so you choose a known size instead of reverse-engineering instance pricing. The platform handles spot, scale-to-zero, and CDN caching underneath.
A quick-win checklist
- [ ] Schedule dev/staging to stop off-hours
- [ ] Delete unattached volumes, old snapshots, idle LBs
- [ ] Right-size based on real p95 utilization
- [ ] Move stateless/batch workloads to spot
- [ ] Put a CDN in front of static assets
- [ ] Add storage lifecycle rules
- [ ] Tag resources and set budget alerts
References
- [AWS Well-Architected: Cost Optimization Pillar](https://docs.aws.amazon.com/wellarchitected/latest/cost-optimization-pillar/welcome.html)
- [Google Cloud cost optimization documentation](https://cloud.google.com/architecture/framework/cost-optimization)
- [FinOps Foundation framework](https://www.finops.org/framework/)
- [Kubernetes resource requests and limits](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/)
- [AWS spot instances best practices](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-best-practices.html)
---
Tired of decoding a sprawling cloud bill? PandaStack gives you predictable plans and handles spot scheduling, scale-to-zero, and CDN caching for you. Start on the free tier at [dashboard.pandastack.io](https://dashboard.pandastack.io).