Skip to main content

FinOps AWS Architecture

Architecture reference for the /finops:aws-monthly command and runbooks PyPI package. Documents the 9-phase execution pipeline, component relationships, and cross-validation decision tree — drawn from live-validated results against a multi-account Landing Zone.


Diagram 1: End-to-End Phase Flow


Diagram 2: Component Architecture


Diagram 3: Cross-Validation Decision Tree


Live-Validated Results

Results from a multi-account Landing Zone (2026-03-24):

MetricResultNotes
Accounts discovered67Organizations API discovered all active accounts
Execution time2.71sThreadPoolExecutor pipelined CE queries
Persona modes7 workingexecutive, architect, sre, cfo, cto, ceo, technical
CFO modeWorkingNZD output, spend vs budget, savings pipeline
CTO modeWorkingService breakdown, architecture cost drivers
SRE modeWorkingAnomaly detection, cost spike alerts
Cross-validationL1 vs L3: 5.9% raw, 0% adjustedSPP discount explains 100% of variance (see G4 gate)
HITL gateActiveTriggers when report total exceeds configured threshold
Evidence pathtmp/cloud-infrastructure/finops/aws/Ephemeral; git-tracked copy in projects/<project>/finops-reports/YYYY-MM/

Quality Gates (G0-G8)

GateNameCriteriaAction on Fail
G0Wheel smoke testpip install dist/*.whl && runbooks --version exits 0Block publish
G1SSO authenticationaws sts get-caller-identity succeeds for all profilesHALT, re-authenticate
G2CE permissionsce:GetCostAndUsage returns data, not AccessDeniedHALT, check IAM policy
G3Account discoveryOrganizations API returns at least one accountFallback to single-account mode
G4L1 vs L3 varianceVariance under 5%FAIL cross-validation, root-cause required
G5Persona outputAll 3 deliverables written (HTML + MD + stakeholder-email.md)Retry persona_formatter
G6Visual verificationScreenshot captured, file size over 10KBAdvisory — non-blocking
G7HITL gateReport reviewed by human when total exceeds thresholdBlock distribution
G8Evidence archiveFiles written to projects/<project>/finops-reports/YYYY-MM/Block completion claim

Agent Coordination

AgentPhaseResponsibility
product-owner0A-COORDRequirements validation, INVEST story alignment, acceptance criteria
cloud-architect0A-COORDArchitecture review, multi-account design, SCP boundary identification
observability-engineer3-4Cross-validation execution, DORA metrics, evidence collection
qa-engineer9Test coverage gates, evidence completeness, quality scoring
product-owner9Business value alignment, savings sourcing (Advisor recommendation IDs required)
cloud-architect9Architecture compliance, security posture review

Coordination logs required at:

  • tmp/<project>/coordination-logs/product-owner-YYYY-MM-DD.json
  • tmp/<project>/coordination-logs/cloud-architect-YYYY-MM-DD.json

Quick Start

Two commands to generate a multi-account AWS cost report:

pip install runbooks
runbooks finops dashboard --all-profile $AWS_BILLING_PROFILE --mode cfo --month 2026-02

For the full 9-phase pipeline with HITL gate and 3-agent scoring, use the ADLC command /finops:aws-monthly. See the quickstart guide for step-by-step instructions.

READONLY Profiles

AWS test data profiles are configured for read operations only. Never pass a profile with write or modify permissions to finops dashboard. The command uses Cost Explorer and Organizations APIs (read-only operations). Verify with aws sts get-caller-identity --profile $BILLING_PROFILE before running.


Anti-Patterns

Anti-PatternDescriptionPrevention
FINOPS_API_SSOT_MISMATCHUsing profile-scoped API totals as authoritative without stating RBAC caveatAlways run Landing Zone scope; document missing accounts
NARROW_SEARCH_SCOPEQuerying a subset of accounts manuallyUse Organizations API for auto-enumeration
NO_ESTIMATED_COUNTSClaiming account counts without citing the source commandCite Organizations API output
NATO_VIOLATIONClaiming "report generated" without evidence in tmp/Require cross-validation.json before completion claim

Architecture validated against CloudOps-S1 sprint, 2026-03-24. Component versions: runbooks v1.3.4, ADLC framework v3.7.2.