FinOps & Cost Optimization
Treat cloud cost as an engineering metric — observable, attributed, and
optimized with the same rigor as latency. The failure mode this skill counters:
nobody owns the bill, so it only gets attention as a quarterly surprise, and
the response is a panicked freeze instead of systematic reduction. Boundaries:
performance-optimization makes code faster (sometimes cheaper as a side
effect); build-vs-buy decides whether to run the capability at all; this
skill optimizes what you do run.
Workflow
Step 1: Visibility Before Optimization
You can't cut what you can't attribute. Establish first:
- Allocation: tag/label resources by service, team, and environment;
measure the untagged remainder and drive it down — an 40%-unattributed bill
makes every later step guesswork.
- The big rocks: rank spend by service and by resource type. Cloud bills
follow a power law; the top 5 line items usually carry most of the total.
Optimizing anything outside them is procrastination with charts.
- Trend vs events: is spend growing with usage (fine, if unit costs hold),
or did it step-change with a deploy (an incident with a dollar signature)?
Pull real billing data (cost explorer exports, infracost on IaC diffs, the
provider CLIs) — never optimize from memory of last quarter's bill.
Step 2: Define Unit Economics
Total spend is noise; cost per unit of value — per customer, per request,
per GB processed, per model inference — is signal. A bill that doubles while
customers triple is a win. Pick 1–3 unit metrics with the team, compute them
from the Step-1 allocation, and make them the number optimization is judged by.
This is also what connects engineering to the business conversation
(metrics-and-okrs).
Step 3: Harvest the Waste (no architecture changes)
The reliable first wins, in typical order of return:
- Orphans: unattached volumes/IPs, forgotten environments, snapshots-forever,
idle dev clusters running nights and weekends (schedule them off).
- Rightsizing: instances/databases provisioned for imagined peak — check
actual utilization (single-digit CPU on a large instance is a purchase order
for the cloud provider, not capacity planning).
- Storage classes & lifecycle: hot-tier data nobody has read in a year;
logs and backups with no expiry — lifecycle policies are one-line fixes.
- Non-prod parity: staging doesn't need production's instance sizes,
replica counts, or retention.
Step 4: Buy Commitment for the Stable Baseline
After rightsizing (never before — you'd lock in the waste): cover the stable,
predictable baseline with reserved instances / savings plans / committed-use
discounts, and keep the spiky remainder on-demand or spot (spot for
interruption-tolerant work: batch, CI, stateless workers). Start conservative
(cover well under 100% of the baseline) and ratchet up as forecasts prove out —
over-commitment converts a variable cost into a fixed regret.
Step 5: Review the Architecture's Cost Shape
Some spend is structural, and only architecture changes move it:
- Egress and cross-zone/region chatter — the classic invisible line item;
co-locate chatty services, cache at the edge, compress.
- Per-invocation pricing at scale — serverless that grew past the
crossover where instances are cheaper (and vice versa: idle instances that
should be serverless).
- Managed-premium vs ops-burden — the managed service's markup is often
worth it (that's a
build-vs-buy call when it gets big).
- Data pipelines — scan-based pricing (warehouse queries over unpartitioned
tables) and always-on streaming for hourly-batch needs (
data-pipeline-design).
Cost these with current provider pricing (verify live — pricing changes), and
record significant trade-offs as ADRs (architecture-design).
Step 6: Keep It Continuous
- Budgets + anomaly alerts per team/service, routed to the owning team —
a cost regression is a defect, detected in days not quarters.
- Cost in the deploy loop: IaC cost diffs (e.g. infracost) in PRs makes
cost visible at decision time.
- A monthly 30-minute review of the unit metrics and top movers beats an
annual cost-cutting project.
Principles Applied
- Attribution before optimization — unowned costs never stay cut.
- Unit economics over totals — growth should raise the bill; only rising
unit cost is a problem.
- Biggest line item first — a 10% cut of the top item beats a 90% cut of
the tenth.
Cross-Skill References
build-vs-buy — whether to run the capability at all; managed-vs-self-hosted TCO
performance-optimization — efficiency work that reduces compute per request
architecture-design — recording cost-driven structural decisions as ADRs
observability-design — the metrics/alerting machinery cost signals ride on
data-pipeline-design — cost-shaping batch/streaming and warehouse workloads
metrics-and-okrs — tying unit economics to business metrics
1---2name: finops-cost-optimization3description: Understand and reduce cloud spend — cost visibility and allocation (tagging, ownership), unit economics, rightsizing, autoscaling, commitment discounts (reserved instances, savings plans), storage/egress traps, architecture cost review, budgets and anomaly alerts. Triggers: cloud costs, AWS bill, cut costs, cost optimization, FinOps, why is our bill so high, rightsizing, reserved instances, savings plan, egress fees, cost per customer. Whether to build or buy a capability → build-vs-buy; making code faster → performance-optimization.4---56# FinOps & Cost Optimization78Treat cloud cost as an engineering metric — observable, attributed, and9optimized with the same rigor as latency. The failure mode this skill counters:10nobody owns the bill, so it only gets attention as a quarterly surprise, and11the response is a panicked freeze instead of systematic reduction. Boundaries:12`performance-optimization` makes code faster (sometimes cheaper as a side13effect); `build-vs-buy` decides whether to run the capability at all; this14skill optimizes what you *do* run.1516## Workflow1718### Step 1: Visibility Before Optimization1920You can't cut what you can't attribute. Establish first:2122- **Allocation**: tag/label resources by service, team, and environment;23 measure the untagged remainder and drive it down — an 40%-unattributed bill24 makes every later step guesswork.25- **The big rocks**: rank spend by service and by resource type. Cloud bills26 follow a power law; the top 5 line items usually carry most of the total.27 Optimizing anything outside them is procrastination with charts.28- **Trend vs events**: is spend growing with usage (fine, if unit costs hold),29 or did it step-change with a deploy (an incident with a dollar signature)?3031Pull real billing data (cost explorer exports, `infracost` on IaC diffs, the32provider CLIs) — never optimize from memory of last quarter's bill.3334### Step 2: Define Unit Economics3536Total spend is noise; **cost per unit of value** — per customer, per request,37per GB processed, per model inference — is signal. A bill that doubles while38customers triple is a win. Pick 1–3 unit metrics with the team, compute them39from the Step-1 allocation, and make them the number optimization is judged by.40This is also what connects engineering to the business conversation41(`metrics-and-okrs`).4243### Step 3: Harvest the Waste (no architecture changes)4445The reliable first wins, in typical order of return:4647- **Orphans**: unattached volumes/IPs, forgotten environments, snapshots-forever,48 idle dev clusters running nights and weekends (schedule them off).49- **Rightsizing**: instances/databases provisioned for imagined peak — check50 actual utilization (single-digit CPU on a large instance is a purchase order51 for the cloud provider, not capacity planning).52- **Storage classes & lifecycle**: hot-tier data nobody has read in a year;53 logs and backups with no expiry — lifecycle policies are one-line fixes.54- **Non-prod parity**: staging doesn't need production's instance sizes,55 replica counts, or retention.5657### Step 4: Buy Commitment for the Stable Baseline5859After rightsizing (never before — you'd lock in the waste): cover the stable,60predictable baseline with reserved instances / savings plans / committed-use61discounts, and keep the spiky remainder on-demand or spot (spot for62interruption-tolerant work: batch, CI, stateless workers). Start conservative63(cover well under 100% of the baseline) and ratchet up as forecasts prove out —64over-commitment converts a variable cost into a fixed regret.6566### Step 5: Review the Architecture's Cost Shape6768Some spend is structural, and only architecture changes move it:6970- **Egress and cross-zone/region chatter** — the classic invisible line item;71 co-locate chatty services, cache at the edge, compress.72- **Per-invocation pricing at scale** — serverless that grew past the73 crossover where instances are cheaper (and vice versa: idle instances that74 should be serverless).75- **Managed-premium vs ops-burden** — the managed service's markup is often76 worth it (that's a `build-vs-buy` call when it gets big).77- **Data pipelines** — scan-based pricing (warehouse queries over unpartitioned78 tables) and always-on streaming for hourly-batch needs (`data-pipeline-design`).7980Cost these with current provider pricing (verify live — pricing changes), and81record significant trade-offs as ADRs (`architecture-design`).8283### Step 6: Keep It Continuous8485- **Budgets + anomaly alerts** per team/service, routed to the owning team —86 a cost regression is a defect, detected in days not quarters.87- **Cost in the deploy loop**: IaC cost diffs (e.g. infracost) in PRs makes88 cost visible at decision time.89- **A monthly 30-minute review** of the unit metrics and top movers beats an90 annual cost-cutting project.9192## Principles Applied9394- **Attribution before optimization** — unowned costs never stay cut.95- **Unit economics over totals** — growth should raise the bill; only rising96 *unit* cost is a problem.97- **Biggest line item first** — a 10% cut of the top item beats a 90% cut of98 the tenth.99100## Cross-Skill References101102- `build-vs-buy` — whether to run the capability at all; managed-vs-self-hosted TCO103- `performance-optimization` — efficiency work that reduces compute per request104- `architecture-design` — recording cost-driven structural decisions as ADRs105- `observability-design` — the metrics/alerting machinery cost signals ride on106- `data-pipeline-design` — cost-shaping batch/streaming and warehouse workloads107- `metrics-and-okrs` — tying unit economics to business metrics