BXUP Track progress & test yourself — free
DevOps / SRE / Platform · Playbook · Foundation · ~5 min read
DEVOPS / SRE / PLATFORM · PLAYBOOK · FOUNDATION

Explain a Cloud Cost Anomaly — and Verify It Against Billing Data

"Why did the bill spike?" lands on ops, not finance. An LLM is genuinely good at turning cost-and-usage data into an attributed narrative — which service, which team, which change, since when — and genuinely bad at arithmetic and at resisting a plausible-sounding story.

Tier: Foundation · Hands-on time: ~35 minutes

This playbook produces a cost-anomaly explanation (and reusable monthly FinOps narratives) where every number and every attribution is re-verified against the billing console before anyone forwards it to leadership.

When to use

  • A cost alert fired (AWS Cost Anomaly Detection, Azure/GCP budget alert, Vantage/CloudZero) and you owe stakeholders an explanation with a cause, not a screenshot.
  • Monthly/quarterly FinOps reporting: per-team showback narratives, trend explanations, unit-economics commentary.
  • A client or manager asks "what changed?" and the answer is buried in thousands of Cost Explorer line items.

Skip AI when the anomaly is already obvious from one Cost Explorer group-by (a single new NAT gateway, an obvious data-transfer spike) — clicking two filters is faster than prompting.

Prerequisites

  • Read access to your billing data: Cost Explorer / CUR export / Azure Cost Management / GCP Billing BigQuery export, or a FinOps tool (Vantage, CloudZero, OpenCost for K8s).
  • Ability to export the anomaly window as CSV — grouped by service, account, and one cost-allocation tag (team/app/env). Untagged spend should appear as its own line, not disappear.
  • Deploy/change context for the same window: merged PRs touching IaC, scaling events, new environments.
  • Comfort with the rule that the billing console is the source of truth — the LLM only narrates it.

The workflow

  1. Export a narrow, grouped dataset. From Cost Explorer (or CUR query), export daily costs for the anomaly window plus 2 weeks of baseline, grouped by service and by your team/app tag. Two small CSVs beat one giant one — LLMs mis-sum big tables.

  2. Establish ground truth first. Before prompting, write down three numbers yourself: total spend for the window, the delta vs baseline, and the top line item. These are your canaries — if the AI's narrative contradicts them, the narrative is wrong.

  3. Ask for an attributed narrative, not a guess. Paste the CSVs plus your change list:

    You are helping explain a cloud cost anomaly. Attached: (a) daily cost by
    service, (b) daily cost by team tag, (c) list of infra changes in the window.
    
    Produce:
    1. One-paragraph summary: what spiked, by how much, starting when.
    2. Attribution table: each contributing line item, its delta vs baseline,
       and the most likely cause FROM THE CHANGE LIST ONLY.
    3. Anything you cannot attribute — list it as "unattributed", do not invent
       a cause.
    4. Every number must be computed from the attached data; show which rows
       you used for each figure.
    
    Do not use external knowledge of typical cloud pricing. If the data does
    not support a claim, say so.
    
  4. Verify every number against the console. Open Cost Explorer and re-check each figure in the attribution table with the corresponding filter. LLM addition errors of 5–20% are common on wide tables. Fix or annotate; anything you cannot reproduce gets deleted.

  5. Verify every attribution against the change. For each "caused by" claim, open the actual PR/deploy/scaling event and confirm timing lines up (cost delta starts after the change, in the right account/region). Correlation offered by the model is a hypothesis, not a finding.

  6. Produce the stakeholder version. Ask for a rewrite: one paragraph for leadership, one table for engineers, explicit "unattributed remainder: ₹X / $X, investigation owner: Y". Reuse the same prompt monthly for FinOps narratives by swapping the dataset — the structure is the recyclable asset.

Key Takeaway:

The LLM writes the narrative; Cost Explorer stays the calculator. Any number you did not re-derive in the billing console does not go in the report.

Tool variants

  • Chat assistant + CSV upload: the default path above; works with any major assistant that accepts file uploads.
  • FinOps platforms with built-in AI (Vantage, CloudZero, Datadog CCM): use their anomaly attribution as the first draft, then apply steps 4–5 unchanged — vendor AI output needs the same verification as your own prompt's.
  • Scripted monthly report: a small script pulls CUR/OpenCost data, calls an LLM API with the step-3 prompt, and opens a draft PR to your FinOps report repo — keeping the human review gate as the PR review.

Verification

  • Your three canary numbers from step 2 appear correctly in the final narrative.
  • Every figure in the attribution table reproduced in the billing console with an explicit filter.
  • Every cause claim linked to a real change with plausible timing; remainder explicitly labeled unattributed.
  • Totals in the narrative sum to the console total within rounding — no invented precision (beware "$12,432.17" when the source shows $12,431.90).

Pitfalls

  • Letting the model do arithmetic on wide tables. Aggregate in the console or a spreadsheet first; feed the model pre-summed rows.
  • Plausible-cause hallucination. "The spike is likely due to increased traffic" is a filler sentence, not attribution. Demand the change list as the only allowed cause vocabulary.
  • Amortization confusion. Unblended vs amortized costs, RI/Savings Plan effects, and support fees routinely trip narratives — state which cost view you exported inside the prompt.
  • Currency and unit drift. Mixed USD/INR reporting or per-day vs per-month figures silently blended into one table.
  • Shipping the first draft. The fluency of the narrative is exactly why an unverified version is dangerous — it will be quoted upward.

Restricted-environment variant

For client cloud accounts under MSA restrictions (typical services-company setup):

  • Billing data is client data. Do not paste it into a public AI tool without written approval — check the client's AI policy first.
  • Redact before prompting: replace account IDs, client name, and app names with placeholders (ACCT_A, APP_1); keep the mapping local. Cost figures alone are usually still sensitive — when in doubt, normalize to percentages of baseline.
  • Client-safe path: run the same workflow against a local model (Ollama, 8B-class handles pre-summed tables) or the client's approved enterprise tenant (Bedrock/Azure OpenAI inside the client VPC).
Warning

A forwarded cost narrative with one wrong attribution can trigger a real budget decision — verification here protects money, not just accuracy.

Success criteria

  • Anomaly explanation delivered in under 40 minutes that previously took a half-day of console archaeology.
  • 100% of numbers console-reproducible; 100% of causes linked to a verifiable change or marked unattributed.
  • The monthly FinOps narrative is now a repeatable 30-minute exercise with a stable prompt template.
  • Finance/leadership stops asking follow-up questions that reveal errors — the report survives scrutiny.
This is the free reading view. Open BXUP to track your progress, run the hands-on labs, and prove it with original, exam-pattern assessments.
© Anvi Innovate · BXUP — Be Exponentially Upskilled · BXUP is an independent learning platform, not affiliated with or endorsed by AWS, Microsoft, Google, NVIDIA, IBM, Salesforce, Databricks, Oracle or Anthropic. All trademarks belong to their respective owners. · bxup.in