---
name: cloud-cost-optimization
description: Manage cloud spend through FinOps practices including cost allocation, right-sizing, reserved instance management, waste identification, budget tracking, and cloud cost optimization. Use when reducing cloud spend, implementing FinOps, managing reserved instances, tracking cloud budgets, or optimizing cloud resource usage. Triggers on phrases like "FinOps", "cloud cost", "cloud spend", "reserved instances", "right-sizing", "cloud budget", "cost allocation", "waste reduction", "cloud optimization", "showback", "chargeback".
---

# Cloud Cost Optimization & FinOps

Implement FinOps practices to optimize cloud spend while maintaining performance and reliability.

## Workflow

### 1. Cloud Cost Visibility & Allocation

1. **Cost data collection and normalization**:
   - Multi-cloud cost data aggregation (AWS, Azure, GCP)
   - Cost categorization by service type (compute, storage, database, network)
   - Currency and pricing normalization
   - Historical cost data retention and trending
   - Commitment and discount tracking

2. **Cost allocation framework**:
   - Resource tagging strategy enforcement
   - Cost allocation by department, project, product, environment
   - Unallocated cost identification and assignment
   - Shared cost allocation methodology
   - Cost center mapping and hierarchy

3. **Budget management and forecasting**:
   - Budget setting by dimension (department, project, environment)
   - Monthly and annual cloud budget planning
   - Forecast modeling based on growth and usage trends
   - Budget vs actual tracking and variance analysis
   - Budget alert and notification configuration

### 2. Cost Optimization Analysis

1. **Resource utilization analysis**:
   - Compute utilization assessment (CPU, memory, network)
   - Storage utilization and access pattern analysis
   - Database connection and query performance analysis
   - Network transfer and data egress analysis
   - Idle and underutilized resource identification

2. **Right-sizing recommendations**:
   - Compute instance right-sizing (upgrade/downgrade)
   - Storage tier optimization (hot, cool, archive, glacier)
   - Database instance sizing optimization
   - Load balancer and networking optimization
   - Auto-scaling policy tuning

3. **Commitment and discount optimization**:
   - Reserved Instance/Savings Plan coverage analysis
   - Commitment term optimization (1-year vs 3-year)
   - Savings Plan vs Reserved Instance strategy
   - Spot instance opportunity identification
   - Volume discount and enterprise discount negotiation

### 3. Optimization Execution

1. **Quick wins implementation**:
   - Idle resource termination (unattached volumes, unused load balancers)
   - Right-sizing execution (with performance monitoring)
   - Storage tier migration
   - Unnecessary data transfer reduction
   - Development/test environment shutdown scheduling

2. **Commitment purchases**:
   - RI/SP purchase recommendation and approval
   - Coverage gap identification and filling
   - Expiration tracking and renewal planning
   - Utilization monitoring post-purchase
   - Flexible vs standard commitment mix optimization

3. **Architecture optimization**:
   - Serverless migration opportunity assessment
   - Container optimization and consolidation
   - Caching strategy improvement
   - Data lifecycle management implementation
   - Multi-tier architecture optimization

### 4. FinOps Culture & Governance

1. **FinOps practice establishment**:
   - FinOps team and role definition
   - Cross-functional collaboration framework (finance, engineering, operations)
   - Cost accountability model
   - Cost optimization cadence and ritual
   - Information radiators and cost transparency

2. **Policy and guardrail development**:
   - Spending approval threshold by amount
   - Resource provisioning cost limit
   - Environment cost budget and enforcement
   - Tag compliance requirements
   - Cost anomaly detection and alerting

3. **Education and enablement**:
   - Cloud cost awareness training for engineers
   - Cost optimization best practice documentation
   - Cost impact visibility in development workflow
   - Engineering team cost ownership model
   - Regular cost review and optimization workshop

### 5. Monitoring & Continuous Improvement

1. **Cost tracking and reporting**:
   - Daily cost monitoring and anomaly detection
   - Weekly cost report and trend analysis
   - Monthly cost optimization report
   - Quarterly business review (QBR) cost presentation
   - Annual cloud budget planning input

2. **Optimization opportunity pipeline**:
   - Continuous optimization opportunity identification
   - Opportunity prioritization (savings potential vs implementation effort)
   - Implementation tracking and closure
   - Savings realization verification
   - ROI measurement per optimization initiative

3. **Maturity assessment and improvement**:
   - FinOps maturity model assessment
   - Process and tool enhancement identification
   - Culture and behavior improvement
   - Vendor relationship and negotiation improvement
   - Benchmark comparison (industry, peer group)

## Templates & Frameworks

### Cloud Cost Optimization Report

```
CLOUD COST OPTIMIZATION REPORT — April 2025
=============================================

COST OVERVIEW:
  Total cloud spend (April): $127,400
  Monthly trend: ↓ 4.2% from March ✓
  Annual run rate: $1.53M
  Budget vs actual: $127,400 / $135,000 (94.4%) ✓

COST BY CLOUD PROVIDER:
  AWS: $78,200 (61.4%)
  Azure: $34,600 (27.2%)
  GCP: $14,600 (11.5%)

COST BY CATEGORY:
  Compute: $52,400 (41.1%)
  Database: $28,700 (22.5%)
  Storage: $18,300 (14.4%)
  Network: $14,200 (11.1%)
  Other: $13,800 (10.9%)

COST BY ENVIRONMENT:
  Production: $89,200 (70.0%)
  Staging: $18,400 (14.4%)
  Development: $14,200 (11.1%)
  Testing: $5,600 (4.4%)

RIGHT-SIZING OPPORTUNITIES:
  Over-provisioned instances: 23 (estimated savings: $8,400/month)
  Underutilized databases: 4 (estimated savings: $3,200/month)
  Storage tier optimization: 12 TB (estimated savings: $1,800/month)
  Total optimization potential: $13,400/month (10.5% of spend)

COMMITMENT COVERAGE:
  Reserved Instance coverage: 78% (target: >80% ⚠)
  Savings Plan coverage: 45% (target: >50% ⚠)
  Total commitment savings: $18,700/month
  RIs expiring in 90 days: 8 (renewal planning needed)
  Spot instance utilization: 23% (batch workloads)

WASTE IDENTIFIED:
  Unattached EBS volumes: 14 ($420/month)
  Unused load balancers: 6 ($240/month)
  Idle development environments: 3 ($680/month)
  Orphaned snapshots: 87 ($180/month)
  Total waste: $1,520/month

MONTHLY SAVINGS ACHIEVED:
  Right-sizing completed: $4,200
  RI/SP optimization: $3,800
  Waste elimination: $2,100
  Architecture optimization: $1,800
  Total: $11,900 (9.3% of spend)
```

### FinOps Operating Model

```
FINOPS OPERATING MODEL — 2025
==============================

FINOPS TEAM STRUCTURE:
  FinOps Lead: [Name] — Strategy, governance, reporting
  Cloud Cost Analyst: [Name] — Analysis, optimization, tracking
  Engineering Liaison: [Name] — Team enablement, implementation support
  Finance Liaison: [Name] — Budget, forecast, accounting alignment

FINOPS CADENCE:
  Daily: Cost anomaly monitoring and alert response
  Weekly: Cost review with engineering leads
  Bi-weekly: Optimization opportunity assessment and prioritization
  Monthly: Cost report and optimization results to leadership
  Quarterly: FinOps maturity assessment and strategy review
  Annually: Cloud budget planning and vendor negotiation

INFORMATION RADIATORS:
  Cloud cost dashboard (real-time, visible to all engineering)
  Team-level cost allocation (per project/department)
  Budget vs actual tracker
  Optimization opportunity pipeline
  Cost per unit metric (cost per transaction, per user, etc.)

COST GOVERNANCE:
  < $1,000/month new resource: Engineer self-approve
  $1,000-$5,000/month: Engineering manager approval
  $5,000-$20,000/month: FinOps + VP Engineering approval
  > $20,000/month: CFO + CIO approval

COST ACCOUNTABILITY:
  Each engineering team owns their cloud cost
  Monthly cost report per team
  Cost per feature/project tracking
  Optimization KPI per team (savings delivered)
  Budget variance accountability

OPTIMIZATION PRIORITIZATION:
  Tier 1 (Immediate): Waste elimination (no risk, high savings)
  Tier 2 (This month): Right-sizing (low risk, medium savings)
  Tier 3 (This quarter): Architecture changes (medium risk, high savings)
  Tier 4 (This year): Major migration/refactoring (high effort, highest savings)
```

## Integration Points

- Cloud cost management (CloudHealth, Cloudability, CloudCheckr, native cloud tools): Cost analysis
- Cloud platforms (AWS Cost Explorer, Azure Cost Management, GCP Cost Table): Native cost data
- Budgeting and forecasting tools: Cloud budget planning
- ITSM platforms: Cost optimization request tracking
- Financial systems: Showback/chargeback integration
- CI/CD platforms: Cost impact in deployment pipeline
- Tagging and governance tools: Resource tag compliance
- BI platforms (Tableau, Power BI): Cost analytics dashboards

## Edge Cases

- **Unexpected cost spike**: Immediate investigation (identify source); emergency cost containment (terminate non-essential); root cause analysis; alert threshold adjustment; prevention measure
- **Multi-cloud cost complexity**: Unified cost dashboard; normalized reporting; cross-cloud optimization; vendor consolidation assessment; contract alignment
- **Rapid growth scaling costs**: Growth-adjusted budget forecast; scalable architecture optimization; commitment pre-purchasing; auto-scaling cost control
- **Engineering resistance to cost optimization**: Cost awareness education; demonstrate cost impact on business; incentivize optimization; provide easy optimization tools
- **Showback/chargeback implementation resistance**: Transparent communication; gradual rollout; departmental cost visibility; fairness in allocation methodology

## Output

### Cloud Cost Dashboard

```
CLOUD COST DASHBOARD — Real-Time
=================================

TODAY'S ESTIMATED COST:
  Current date spend: $4,180
  Monthly projection: $127,400
  Budget remaining: $7,600 (5.6%)
  Anomaly detected: No ✓

COST TREND:
  Last 7 days avg: $4,120/day
  vs Last month: -4.2% ✓
  vs Budget: On track ✓
  Annual run rate: $1.53M

TOP COST DRIVERS:
  1. EC2 compute: $32,400 (25.4%)
  2. RDS databases: $21,800 (17.1%)
  3. S3 storage: $12,600 (9.9%)
  4. Data transfer: $9,800 (7.7%)
  5. EKS containers: $8,400 (6.6%)

TEAM COST ALLOCATION:
  Platform team: $28,400 (22.3%)
  Product team: $24,600 (19.3%)
  Data team: $21,200 (16.6%)
  Security team: $14,800 (11.6%)
  Dev/Test: $19,800 (15.5%)
  Unallocated: $8,600 (6.8%) ⚠

OPTIMIZATION STATUS:
  Active recommendations: 18
  Estimated monthly savings: $13,400
  Implemented this month: 12 (saved $11,900)
  In progress: 4
  Pending approval: 2

COMMITMENT STATUS:
  RI utilization: 91% ✓
  Savings Plan utilization: 88% ✓
  RI savings this month: $18,700
  Expiring commitments: 8 (90 days)
  Recommended purchases: 3 (additional $4,200 savings)

BUDGET ALERTS:
  No budgets at risk ✓
  Closest to limit: Dev/Test (92% of budget)
  Forecast overspend: None
```

## Trigger Phrases

"FinOps", "cloud cost", "cloud spend", "reserved instances", "right-sizing", "cloud budget", "cost allocation", "waste reduction", "cloud optimization", "showback", "chargeback", "savings plan", "cloud billing", "cost anomaly", "cloud finance"
