Understanding FinOps Principles

Learn the core principles of FinOps and how they translate to practical DevOps workflows for cost optimization.

FinOps operates on three fundamental principles that align naturally with DevOps practices. Understanding these principles helps you implement cost optimization in ways that enhance rather than hinder your engineering workflows.

The Three Pillars of FinOps

Visibility: You Can't Optimize What You Can't See

Cloud bills are notoriously difficult to understand. A single AWS bill might include hundreds of services across multiple regions, with charges that vary by hour, usage tier, and commitment level. Without clear visibility into what's driving costs, optimization becomes guesswork.

For DevOps teams, visibility means:

  • Resource-level cost tracking: Knowing what each service, environment, and feature costs
  • Real-time cost monitoring: Understanding spend as it happens, not weeks later
  • Cost attribution: Connecting cloud spend to specific teams, projects, or business functions

Here's what good visibility looks like in practice:

# Example: Using AWS CLI to get daily cost breakdown by service
aws ce get-cost-and-usage \
  --time-period Start=2025-01-01,End=2025-01-15 \
  --granularity DAILY \
  --metrics BlendedCost \
  --group-by Type=DIMENSION,Key=SERVICE

This command shows daily costs broken down by AWS service, helping you identify trends and spikes quickly.

Optimization: Continuous Improvement for Cloud Spend

Optimization in FinOps isn't a one-time project - it's an ongoing process of finding and eliminating waste while improving efficiency. This aligns perfectly with DevOps principles of continuous improvement and automation.

Cloud optimization opportunities typically fall into three categories:

  1. Right-sizing: Matching resource capacity to actual demand
  2. Resource scheduling: Turning off non-production resources when not needed
  3. Commitment optimization: Using reserved instances, savings plans, or spot instances appropriately

Here's an example of automated right-sizing using Terraform and AWS:

# Terraform configuration that adjusts instance size based on utilization metrics
resource "aws_cloudwatch_metric_alarm" "high_cpu" {
  alarm_name          = "ec2-high-cpu-${var.instance_name}"
  comparison_operator = "GreaterThanThreshold"
  evaluation_periods  = "2"
  metric_name         = "CPUUtilization"
  namespace           = "AWS/EC2"
  period              = "300"
  statistic           = "Average"
  threshold           = "80"

  dimensions = {
    InstanceId = aws_instance.web.id
  }

  alarm_actions = [aws_sns_topic.scaling_alerts.arn]
}

# Auto Scaling Group that responds to the alarm
resource "aws_autoscaling_group" "web" {
  name                = "web-asg"
  vpc_zone_identifier = var.subnet_ids
  target_group_arns   = [aws_lb_target_group.web.arn]
  health_check_type   = "ELB"

  min_size         = 1
  max_size         = 10
  desired_capacity = 2

  launch_template {
    id      = aws_launch_template.web.id
    version = "$Latest"
  }

  tag {
    key                 = "Name"
    value               = "web-server"
    propagate_at_launch = true
  }
}

This configuration automatically scales resources based on demand, ensuring you're not paying for unused capacity.

Governance: Guardrails Without Gatekeeping

Governance in FinOps means establishing policies and controls that prevent cost surprises while maintaining development velocity. Unlike traditional IT governance, FinOps governance should be automated and non-blocking whenever possible.

Effective governance includes:

  • Budget alerts: Automated notifications when spending approaches limits
  • Cost controls: Preventing accidental deployment of expensive resources
  • Tagging policies: Ensuring resources can be properly attributed and managed
  • Approval workflows: Requiring review for high-cost changes

Here's an example of implementing cost governance in a CI/CD pipeline:

# GitHub Actions workflow that includes cost estimation
name: Infrastructure Deployment
on:
  pull_request:
    paths: ['terraform/**']

jobs:
  cost-estimate:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3

      - name: Setup Infracost
        uses: infracost/actions/setup@v2
        with:
          api-key: ${{ secrets.INFRACOST_API_KEY }}

      - name: Generate cost estimate
        run: |
          cd terraform
          infracost breakdown --path . --format json --out-file /tmp/infracost.json

      - name: Check cost increase
        run: |
          # Fail if monthly cost increase exceeds $500
          COST_INCREASE=$(jq -r '.diffTotalMonthlyCost' /tmp/infracost.json)
          if (( $(echo "$COST_INCREASE > 500" | bc -l) )); then
            echo "Cost increase of $COST_INCREASE exceeds threshold"
            exit 1
          fi

      - name: Post cost comment
        uses: infracost/actions/comment@v1
        with:
          path: /tmp/infracost.json
          behavior: update

This workflow automatically estimates the cost impact of infrastructure changes and blocks deployments that exceed defined thresholds.

The FinOps Operating Model

FinOps follows a three-phase operating model that repeats continuously:

Inform Phase: Building Awareness

The inform phase focuses on creating cost transparency and building organizational awareness. For DevOps teams, this means:

  • Setting up cost monitoring dashboards
  • Implementing proper resource tagging
  • Creating cost allocation reports
  • Establishing baseline metrics

Optimize Phase: Taking Action

Once you have visibility, the optimize phase involves taking specific actions to reduce costs:

  • Right-sizing underutilized resources
  • Eliminating waste and unused resources
  • Implementing automated cost optimization
  • Negotiating better rates with cloud providers

Operate Phase: Establishing Continuous Practices

The operate phase embeds cost optimization into regular operations:

  • Regular cost reviews and optimization cycles
  • Automated cost controls and governance
  • Cultural changes that make cost awareness routine
  • Continuous improvement of FinOps practices

FinOps Maturity Levels

Organizations typically progress through three maturity levels:

Crawl: Basic cost visibility and manual optimization

  • Monthly cost reports
  • Manual resource cleanup
  • Basic tagging implementation

Walk: Automated optimization and proactive cost management

  • Real-time cost monitoring
  • Automated resource scheduling
  • Cost attribution by team or project

Run: Advanced optimization and cost-aware culture

  • Predictive cost modeling
  • Automated optimization at scale
  • Cost considerations in all engineering decisions

Most organizations start at the crawl level and gradually build capabilities. The key is making steady progress rather than trying to implement everything at once.

Aligning FinOps with DevOps Values

FinOps shares core values with DevOps:

  • Collaboration: Breaking down silos between engineering and finance
  • Automation: Using tools to eliminate manual processes
  • Measurement: Making decisions based on data rather than assumptions
  • Continuous improvement: Iterating and improving over time
  • Shared responsibility: Making everyone accountable for outcomes

These shared values make FinOps a natural extension of DevOps practices rather than an additional burden.

Found an issue?