# Finops Cloud Cost

> FinOps & Cloud Cost Optimization

- Skill: `j4flmao/finops-cloud-cost` (Agent Skill)
- Install (CLI): `npx skillmds@latest add j4flmao/finops-cloud-cost`
- Raw SKILL.md: https://api.skillmd.com/api/skills/j4flmao/finops-cloud-cost/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: DevOps & Infra
- Author: j4flmao (https://skillmd.com/u/j4flmao)
- Updated: 2026-09-21
- Page: https://skillmd.com/skills/j4flmao/finops-cloud-cost

---

# FinOps & Cloud Cost Optimization

## 1. Skill Context
**Focus**: Treating cloud costs as a primary engineering metric. Bridging the gap between engineering, finance, and business to maximize ROI in AWS, GCP, or Azure.
**Triggers**: finops, cloud-cost, cost-optimization, spot-instances, right-sizing, aws-billing.

## 2. The Cloud Cost Fallacy
In traditional on-premise data centers, hardware is a sunk cost (CapEx). If a server is running at 10% CPU, it doesn't cost the company extra money.
In the Cloud (OpEx), you pay for exactly what you provision, by the second. If an engineer provisions an `m5.24xlarge` for a background script and forgets about it, they can bankrupt a startup in a weekend. **Cost is a system architecture problem.**

## 3. The 3 Pillars of FinOps Optimization

### A. Right-Sizing
Developers over-provision resources out of fear ("I'll just use 32GB of RAM just in case").
- **Action**: Use tools like AWS Compute Optimizer or Datadog to track the P99 CPU and Memory utilization over a 30-day period. 
- If a server's P99 CPU is 15%, it must be downgraded to a smaller instance family. 

### B. Elasticity & Spot Instances
Do not run staging environments 24/7. Turn them off at night and on weekends to instantly save 70% of costs.
- **Spot Instances**: Cloud providers sell unused data center capacity at a 90% discount. The catch? They can terminate your instance with a 2-minute warning.
- **Architecture**: Design batch processors, CI/CD runners, and background worker queues to be stateless and interruptible. Run them exclusively on Spot Instances.

### C. Rate Optimization (Commitments)
For the baseline load that must run 24/7 (e.g., the core production database), on-demand pricing is a rip-off.
- **Reserved Instances (RIs) / Savings Plans**: Commit to AWS/GCP that you will spend $X/hour for the next 1 or 3 years. In exchange, you receive a 40-60% discount on that compute baseline.

## 4. The Silent Killer: Data Transfer (Egress) Costs
Ingesting data into the cloud is usually free. Extracting data (Egress) is exorbitantly expensive.
- **Anti-Pattern**: A database in `us-east-1a` communicating heavily with a microservice in `us-east-1b` incurs Cross-AZ data transfer fees.
- **Anti-Pattern**: Routing all static image traffic through your expensive EC2 application servers.
- **Solution**: Cache aggressively at the edge using CDNs (CloudFront, Cloudflare). Ensure microservices that chatter heavily are localized to the same Availability Zone where possible.

