Skip to content

runbooks finops analyze-ec2ΒΆ

Auto-generated from runbooks finops analyze-ec2 --help on 2026-05-21. Source of truth: runbooks PyPI package v1.3.22

Usage: runbooks finops analyze-ec2 [OPTIONS]

  EC2 cost analysis with 4-way enrichment.

  πŸ”„ 4-WAY ENRICHMENT LAYERS (E1-E7 Decommission Scoring)
  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
  β”‚ Layer 1: Discovery       β”‚ Resource Explorer EC2 inventory   β”‚
  β”‚ Layer 2: Organizations   β”‚ Account metadata (6 columns)      β”‚
  β”‚ Layer 3: Cost            β”‚ 12-month Cost Explorer trends     β”‚
  β”‚ Layer 4: Activity        β”‚ CloudTrail idle detection (opt)   β”‚
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

  πŸ“Š DECOMMISSION SIGNALS (E1-E7)
  β€’ E1: Instance stopped state β†’ +15 points (HIGH priority)
  β€’ E2: Zero 12-month cost β†’ +12 points (Terminated/Free tier)
  β€’ E3: Low monthly cost (<$5) β†’ +8 points (Micro workloads)
  β€’ E4: No CloudTrail activity (14d) β†’ +10 points (Idle detection)
  β€’ E5: Cost decreasing trend β†’ +5 points (Usage declining)
  β€’ E6: Legacy instance type (t2, m4) β†’ +3 points (Modernization)
  β€’ E7: Untagged resources β†’ +2 points (Management overhead)

  🎯 OPTIMIZATION TIERS
  β€’ HIGH (β‰₯25 points): Immediate decommission candidates
  β€’ MEDIUM (15-24 points): Review recommended within 30 days
  β€’ LOW (<15 points): Monitor and maintain current state

  πŸ’° Sprint 1 Target: 25-50% cost savings via tier-based decommission
  πŸ“– Example: runbooks finops analyze-ec2 -i ec2.xlsx -o enriched.xlsx -m mgmt -b billing

Options:
  -i, --input PATH                Input EC2 inventory Excel file (with
                                  Identifier, AWS Account, Region columns)
                                  [required]
  -o, --output PATH               Output enriched Excel file (multi-sheet with
                                  cost analysis)  [required]
  --enable-organizations / --no-organizations
                                  Enable Organizations metadata enrichment
                                  (default: enabled)
  --enable-cost / --no-cost       Enable Cost Explorer enrichment (default:
                                  enabled)
  --enable-activity / --no-activity
                                  Enable CloudTrail activity tracking
                                  (default: disabled, takes 60-90 seconds)
  --include-12month-cost / --no-12month-cost
                                  Include 12-month cost breakdown (default:
                                  enabled)
  --decommission-mode / --no-decommission-mode
                                  Decommission mode: Filter to 45 decision-
                                  focused columns (default: disabled, shows
                                  all 87 columns)
  -v, --verbose                   Show detailed logs
  --format [compact|table|json]   Output format
  --output-dir PATH               Output directory for exported files
  --profile TEXT                  AWS profile (KISS: auto-resolves
                                  management/billing/ops from
                                  AWS_MANAGEMENT_PROFILE, AWS_BILLING_PROFILE
                                  env vars)
  --all-profile TEXT              Multi-Account: management profile for
                                  Organizations + Cost Explorer across all
                                  accounts. Resolves MANAGEMENT, BILLING,
                                  OPERATIONAL profiles from env vars.
  --help                          Show this message and exit.

ExamplesΒΆ