← Home ← Codex ← DEBT ← Engine
Browse by Category
+ added · updated 7d
← Back to glossary

Cloud Cost Optimisation

Cloud Intermediate
debt(d5/e5/b5/t5)
d5 Detectability Operational debt — how invisible misuse is to your safety net

Closest to 'specialist tool catches' (d5). The term's detection_hints list aws-cost-explorer, infracost, and kubecost as tools that can identify waste patterns like <20% CPU usage, missing auto-scaling, and oversized instances. These are specialist FinOps/cost tools rather than default linters or compiler checks.

e5 Effort Remediation debt — work required to fix once spotted

Closest to 'touches multiple files / significant refactor in one component' (e5). The quick_fix mentions right-sizing instances, switching to spot instances for batch workers, and enabling auto-scaling. While individual fixes can be small (e.g., changing instance type), comprehensive cost optimisation requires infrastructure config changes across multiple services, lifecycle rules on storage, and auto-scaling policies—a significant refactor of infrastructure-as-code.

b5 Burden Structural debt — long-term weight of choosing wrong

Closest to 'persistent productivity tax' (b5). Cloud cost optimisation applies broadly (web, cli contexts per applies_to) and requires ongoing attention. Without active management, waste accumulates continuously (30-40% mentioned in why_it_matters). Every new resource provisioning decision must consider cost, creating a persistent tax on all infrastructure work, though it doesn't quite define the system's architecture.

t5 Trap Cognitive debt — how counter-intuitive correct behaviour is

Closest to 'notable trap' (t5). The misconception explicitly states 'Cloud is always cheaper than on-premise' — this is a documented gotcha that developers eventually learn through painful bills. Many assume cloud auto-optimises or that flexibility equals efficiency, when reality requires active management. It's a notable trap but not catastrophic since the 'wrong way' doesn't break systems, just bleeds money.

About DEBT scoring →

Also Known As

FinOps cloud cost right-sizing reserved instances

TL;DR

Systematically reducing cloud spend without reducing capability — right-sizing instances, using reserved/spot pricing, eliminating waste, and architecting for cost from the start.

Explanation

Cloud cost optimisation pillars: Right-sizing (use metrics to pick the correct instance size — most are 30-50% oversized), Pricing models (Reserved Instances save 40-60% vs on-demand, Spot Instances save 70-90% for interruptible workloads), Waste elimination (stop idle instances, delete unused snapshots and load balancers, use S3 lifecycle rules), Architecture (serverless for spiky workloads, auto-scaling to match demand, CDN to reduce origin requests). Tools: AWS Cost Explorer, CloudHealth, Infracost. Tag all resources for cost attribution.

Common Misconception

Cloud is always cheaper than on-premise — misconfigured or over-provisioned cloud infrastructure is often more expensive than equivalent on-premise; active cost management is required.

Why It Matters

Most cloud bills have 30-40% of spend as pure waste — idle resources, oversized instances, and forgotten test environments that run 24/7 add up to thousands per month for mid-size applications.

Common Mistakes

  • Production-sized environments running 24/7 for dev/staging — scale them down or stop outside working hours.
  • No auto-scaling — static instances sized for peak traffic pay for peak capacity 24/7.
  • On-demand pricing for stable baseline workloads — Reserved Instances save 40-60% for predictable load.
  • S3 buckets accumulating old versions and logs forever — apply lifecycle rules.

Code Examples

✗ Vulnerable
// No cost controls — surprise bill:
// 10 r5.2xlarge EC2 instances running 24/7 on-demand
// Dev, staging, and prod all same size
// 50 EBS snapshots never cleaned up
// S3 bucket: 5 years of uncompressed access logs
// Monthly bill: $12,000
// Could be: $3,000 with optimisation
✓ Fixed
// Cost-optimised architecture:
// Production: 3x r5.large Reserved (1yr) + auto-scaling
// Staging: stopped 18:00-08:00 via Lambda scheduler
// Dev: t3.small on-demand, stop when idle
// Spot instances for batch jobs: 80% cost reduction
// S3 lifecycle: transition to Glacier after 90 days
// Monthly bill: $3,200 (73% reduction)

// Infracost in CI:
// infracost diff --path . shows cost impact of each PR

Added 16 Mar 2026
Edited 22 Mar 2026
Views 115
Rate this term
No ratings yet
🤖 AI Guestbook educational data only
| |
Last 30 days
1 ping T 0 pings F 0 pings S 1 ping S 0 pings M 0 pings T 2 pings W 0 pings T 0 pings F 0 pings S 1 ping S 0 pings M 3 pings T 2 pings W 0 pings T 0 pings F 1 ping S 0 pings S 0 pings M 0 pings T 0 pings W 1 ping T 0 pings F 0 pings S 0 pings S 0 pings M 0 pings T 0 pings W 0 pings T 1 ping F
PetalBot 1
No pings yesterday
Amazonbot 17 Perplexity 8 Scrapy 7 Ahrefs 6 Google 6 Bing 5 SEMrush 5 PetalBot 5 ChatGPT 4 Unknown AI 2 Applebot 2 Claude 1 Majestic 1 Twitter/X 1
crawler 68 crawler_json 2
🧱 FUNDAMENTALS — new to this? Start with the ground floor.
Cloud cloud The cloud refers to remote servers accessed over the internet that store data, run applications, and provide computing power instead of using your local machine.

Almost every modern application relies on cloud infrastructure. Understanding the cloud helps you deploy apps, manage costs, and build systems that can handle real-world traffic without buying physical hardware.

💡 Think of the cloud as renting computers by the hour — you pay for what you use, so always turn off what you're not using.

Ask Codex about Cloud →
DEV INTEL Tools & Severity
🟡 Medium ⚙ Fix effort: Medium
⚡ Quick Fix
Right-size instances using actual metrics not guesses; use spot/preemptible instances for batch queue workers (70% cheaper); enable auto-scaling to match demand instead of over-provisioning
📦 Applies To
any web cli
🔗 Prerequisites
🔍 Detection Hints
Instances at <20% average CPU; no auto-scaling; same instance type for web workers and batch jobs; unused Elastic IPs
Auto-detectable: ✓ Yes aws-cost-explorer infracost kubecost
⚠ Related Problems
🤖 AI Agent
Confidence: Low False Positives: High ✗ Manual fix Fix: Medium Context: File


✓ schema.org compliant