# Cur Cost Usage Report Auditor

> Audits AWS Cost and Usage Report (CUR) configurations for coverage gaps, data staleness, report-version drift, missing Athena integration, disabled S3 bucket versioning, and time-horizon limits. Emits a deterministic verdict (NO_CUR | STALE | CONFIG_GAP | OK) per report definition or payer account. Use when reviewing CUR health, checking whether Athena cost queries are wired, validating hourly refresh cadence, or auditing FinOps data pipeline posture before a cost-optimization initiative.

- Skill: `jhkchan/cur-cost-usage-report-auditor` (Agent Skill, multi-file: 20 files)
- Install (CLI): `npx get-skill add jhkchan/cur-cost-usage-report-auditor`
- Raw SKILL.md: https://api.skillmd.com/api/skills/jhkchan/cur-cost-usage-report-auditor/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: DevOps & Infra
- License: Apache-2.0
- Author: jhkchan (https://skillmd.com/u/jhkchan)
- Updated: 2026-11-23
- Page: https://skillmd.com/skills/jhkchan/cur-cost-usage-report-auditor

---


# CUR Cost and Usage Report Auditor

## Mindset

**One-line takeaway:** CUR is the only source of line-item-granular cost
data in AWS. The verdict cascades: no CUR → nothing else matters; stale
CUR → wrong decisions; config gap → blind spots; OK → pipeline is healthy.

CUR underpins every FinOps pipeline. Three properties determine its health:
- **Existence** — without CUR there is zero line-item cost visibility.
  Cost Explorer is aggregated (service/daily), and Budgets is threshold-
  based. Neither gives per-resource hourly spend needed for attribution.
- **Freshness** — CUR files are delivered asynchronously (within ~8h for
  hourly, ~24h for daily). A stale CUR feeds dashboards outdated data,
  causing missed anomalies and wrong forecasts.
- **Completeness** — a fresh CUR can still have blind spots: wrong report
  version (missing Savings Plans columns), no Athena integration (can't
  query), no S3 versioning (no recovery), missing resource IDs (can't
  attribute cost to individual resources).

## Quick reference — verdict thresholds

| Condition | Verdict | Rule |
|---|---|---|
| Zero report definitions on the payer account | **NO_CUR** | Step 1 |
| Hourly CUR, latest manifest > 48h old | **STALE** | Step 2a |
| Daily CUR, latest manifest > 72h old | **STALE** | Step 2b |
| ReportVersion is not `cur-1.0` | **CONFIG_GAP** | Step 3a |
| Format is not `Parquet` (blocks Athena) | **CONFIG_GAP** | Step 3b |
| AdditionalArtifacts does not include `ATHENA` | **CONFIG_GAP** | Step 3c |
| S3 bucket versioning is `Suspended` or not enabled | **CONFIG_GAP** | Step 3d |
| AdditionalSchemaElements does not include `Resources` | **CONFIG_GAP** | Step 3e |
| RefreshClosedReports is `false` | **CONFIG_GAP** | Step 3f |
| All dimensions pass | **OK** | Step 4 |

See the ordered steps below for edge cases. Deep CUR delivery internals
(manifest format, partition pruning, late-arrival reprocessing) are in
the [Deep reference](#deep-reference-cur-delivery-internals) section.

## Input schema — concrete examples

**Mode A — offline config audit (report-definition JSON):**

```json
{
  "ReportName": "cur-hourly-athena",
  "TimeUnit": "HOURLY",
  "Format": "Parquet",
  "Compression": "Parquet",
  "AdditionalSchemaElements": ["Resources"],
  "S3Bucket": "my-cur-bucket",
  "S3Prefix": "cur",
  "S3Region": "us-east-1",
  "AdditionalArtifacts": ["ATHENA"],
  "RefreshClosedReports": true,
  "ReportVersion": "cur-1.0",
  "BillingViewArn": null
}
```

Paired metadata (optional but recommended for full audit):
```json
{
  "bucket_versioning_status": "Enabled",
  "latest_manifest_timestamp": "2026-08-02T04:15:00Z",
  "glue_table_exists": true,
  "cur_created_at": "2026-06-01T10:00:00Z"
}
```

**Mode B — live-account audit (payer account id only):**
```json
{ "payer_account_id": "123456789012" }
```

Valid `Format` values: `Parquet` | `textORcsv` (the literal API enum —
CSV with optional GZIP). Valid `TimeUnit` values: `HOURLY` | `DAILY`.
Valid `ReportVersion`: `cur-1.0` only (legacy omitted from API output).

## Pre-flight: account context gate

Before evaluating CUR configuration, classify the account context.
Several conditions short-circuit the audit — misclassifying them produces
false NO_CUR verdicts.

**Live-account pre-flight checks (skip for offline config audit):**
1. Confirm the target account is the **payer (management) account**, not
   a linked (member) account. CUR is a billing-account-level service —
   `aws cur describe-report-definitions` on a linked account returns an
   empty list even if the payer has CUR configured. This is NOT a NO_CUR
   finding; it is an account-context error.
2. Run API calls in `us-east-1`. The CUR service endpoint is
   `cur.us-east-1.amazonaws.com`. Calls in other regions may silently
   return empty results or `AccessDeniedException` depending on the
   IAM policy region scoping.
3. Snapshot the latest manifest timestamp BEFORE classification:
   `aws s3api list-objects-v2 --bucket <bucket> --prefix <prefix>/
   <report-name>/ --query 'Contents[?ends_with(Key,`-Manifest.json`)]
   .[LastModified]' --output text | sort | tail -1`
   This gives the authoritative freshness signal — more reliable than
   the console's "last refreshed" indicator, which caches for up to 1h.

| Attribute | Effect on audit |
|---|---|
| Account type: linked (member) | CUR cannot be created here — only the **payer** account can configure CUR. Empty report list is EXPECTED. Output `VERDICT: ERROR` with note "CUR is a payer-account service; run this audit on the management account." |
| Account type: payer (management) | Proceed with full audit. |
| Multiple report definitions | Audit each independently. A payer can have up to 50 CUR definitions. Aggregate the worst verdict across all definitions for the account-level rollup. |
| Region of API call | Must be `us-east-1`. Other regions may return stale or empty results. |

### Error handling — API and input failures

Full error handling (AccessDeniedException + minimum auditor policy, ~1 TPS throttling with backoff, malformed-input ERROR, missing-manifest prefix mismatch): [references/error-handling.md](references/error-handling.md).

## Process — Classification logic (apply in order, aggregate worst)

### Step 0: Expert knowledge — non-obvious CUR behaviors that change classification

Full catalog (delivery windows, manifest as freshness signal, cur-1.0 minimum, Athena crawler requirement, bucket-policy delivery failure, no backfill, RefreshClosedReports freeze, Resources opt-in, partition pruning, 50-definition cap, BillingViewArn, billing-period prefixes, Parquet vs CSV cost, Glue partition schema drift): [references/advanced-patterns.md](references/advanced-patterns.md).

### Step 1: NO_CUR — existence check (highest priority — zero cost visibility)

If the payer account has zero report definitions
(`describe-report-definitions` returns `ReportDefinitions: []`), the
verdict is **NO_CUR**. This is the worst posture — there is no line-item
cost data at all. FinOps pipelines, cost-allocation analytics, and
per-resource attribution all depend on CUR existence.

A linked account returning empty is NOT NO_CUR — it is an account-context
error (see Pre-flight gate).

### Step 2: STALE — freshness check (data pipeline has stopped)

Extract the latest manifest timestamp from S3 (see Pre-flight step 3).
If no manifest exists in the prefix at all, treat as STALE (the CUR was
configured but has never delivered — a broken delivery pipeline).

- **Step 2a — Hourly cadence:** If `TimeUnit: HOURLY` and the latest
  manifest is **more than 48 hours** old → **STALE**. Hourly files
  deliver within ~8h; 48h is 6x the delivery window. At this threshold,
  delivery has definitively stopped, not merely lagged.

- **Step 2b — Daily cadence:** If `TimeUnit: DAILY` and the latest
  manifest is **more than 72 hours** old → **STALE**. Daily files
  deliver within ~24h; 72h is 3x the delivery window.

- **Edge case — newly created CUR (< 48h old):** A CUR created within
  the last 48 hours has not yet delivered its first file. This is NOT
  stale — it is the expected startup window. Check the CUR creation
  timestamp (or the report definition's first-seen date) before applying
  the staleness threshold. Emit a note: "CUR created <48h ago; first
  delivery pending — check again after 8h."

- **Edge case — end of billing period:** CUR re-delivers the entire
  billing period's data at the start of each new period (bill-close
  processing). During this window (~6-12h around the 1st of each month),
  the latest manifest timestamp may be 24-36h old for hourly CURs. This
  is expected; do not flag as STALE if the current date is within 2 days
  of a billing-period boundary.

### Step 3: CONFIG_GAP — completeness check (configuration defects)

If the CUR exists and is fresh, evaluate each configuration dimension.
Any dimension that fails → **CONFIG_GAP**. Apply in order — the first
failing dimension produces the verdict, but enumerate ALL failing
dimensions in FINDINGS:

- **Step 3a — Report version:** If `ReportVersion` is not `cur-1.0`
  (or not present, which defaults to legacy), the CUR uses the old
  schema. Missing columns: Savings Plans amortization, cost categories,
  expanded `lineItemType` values. This causes reconciliation drift and
  breaks downstream transforms that expect `cur-1.0` columns.

- **Step 3b — Format:** If `Format` is not `Parquet`, Athena integration
  is impossible. CSV/GZIP formats cannot be queried by Athena via the
  standard CUR Glue table. A CUR without Athena integration requires
  manual S3 downloads and local parsing — impractical for any real
  FinOps workflow.

- **Step 3c — AdditionalArtifacts:** If `AdditionalArtifacts` does not
  include `ATHENA`, CUR will not generate the `athena_integration/`
  prefix with the CloudFormation crawler template. Even with
  `Format: Parquet`, the Athena table will not be auto-created.
  Check for `REDSHIFT` and `QUICKSIGHT` artifacts as informational
  findings (they add value but are not required for core Athena flow).

- **Step 3d — S3 bucket versioning:** If the CUR destination bucket has
  `Status: Suspended` or no versioning configuration, CUR data files
  have no point-in-time recovery. A botched downstream transform (e.g.,
  a Glue job that overwrites the CUR prefix) permanently destroys the
  original data. S3 versioning is the only recovery mechanism for CUR
  data — CUR itself does not version its outputs.

- **Step 3e — AdditionalSchemaElements (Resources):** If
  `AdditionalSchemaElements` does not include `Resources`, the CUR lacks
  the `lineItem/ResourceId` column. Cost cannot be attributed to
  individual resources — only to service/account/tag level. This blinds
  per-resource right-sizing and waste-detection efforts.

- **Step 3f — RefreshClosedReports:** If `RefreshClosedReports` is
  `false`, previously-closed billing periods are frozen at first
  delivery. Late corrections (refunds, credits, Savings Plans true-ups,
  edp discounts) never propagate. The CUR will perpetually disagree with
  the Billing console for any month that receives post-close adjustments.

### Step 4: OK — all dimensions pass

If the CUR exists, is fresh, and passes all CONFIG_GAP checks (Steps
3a-3f), the verdict is **OK**. The FinOps data pipeline is healthy.

For an account-level rollup with multiple CUR definitions, the account
verdict is the **worst** across all definitions:
`NO_CUR > STALE > CONFIG_GAP > OK`.

## Output format (per report definition)

```text
REPORT: <report-name>
VERDICT: NO_CUR | STALE | CONFIG_GAP | OK
REASON: <1-2 sentences citing the specific finding and step number>
FINDINGS:
  - [CRITICAL] <finding description (Step Na)>
  - [HIGH] <finding description (Step Nb)>
  - [OK] <dimension that passed>
REMEDIATION: <specific action per finding, or "None required" if OK>
```

**Per-finding severity mapping:**
- NO_CUR → **CRITICAL** — zero line-item cost visibility
- STALE → **HIGH** — data pipeline stopped; dashboards unreliable
- CONFIG_GAP Step 3a (legacy version) → **HIGH** — missing cost columns
- CONFIG_GAP Step 3b/3c (no Athena) → **HIGH** — no query capability
- CONFIG_GAP Step 3d (no versioning) → **MEDIUM** — no data recovery
- CONFIG_GAP Step 3e (no Resources) → **MEDIUM** — no resource attribution
- CONFIG_GAP Step 3f (no refresh closed) → **MEDIUM** — reconciliation drift
- OK → **LOW**

### Worked example — stale CUR with Athena gap

```text
REPORT: my-cur-hourly
VERDICT: STALE
REASON: Latest manifest is 9 days old for an hourly-cadence CUR (Step 2a)
— delivery pipeline has stopped. Athena integration is also misconfigured.
FINDINGS:
  - [HIGH] Hourly CUR manifest last delivered 9 days ago; staleness
    threshold is 48h (Step 2a)
  - [HIGH] Format is CSV/GZIP — Athena integration is not possible (Step 3b)
  - [MEDIUM] AdditionalArtifacts missing ATHENA (Step 3c)
  - [MEDIUM] S3 bucket versioning is Suspended (Step 3d)
REMEDIATION:
  1. HIGH — Verify the S3 bucket policy grants billingreports.amazonaws.com
     PutObject + GetBucketAcl. Check for deleted BillingViewArn.
     Re-run: aws cur describe-report-definitions to confirm config is intact.
  2. HIGH — Update Format to Parquet: aws cur put-report-definition
     --report-definition file://cur-def.json (Format: Parquet)
  3. MEDIUM — Add 'ATHENA' to AdditionalArtifacts in the report definition.
  4. MEDIUM — Enable S3 versioning:
     aws s3api put-bucket-versioning --bucket <bucket>
     --versioning-configuration Status=Enabled
```

## Anti-Patterns — NEVER

- NEVER classify a linked (member) account with zero CUR definitions as
  NO_CUR. CUR is a payer-account service; linked accounts inherit the
  payer's configuration. Flag as ERROR with a redirect to the management
  account.

- NEVER treat a CUR created within the last 48 hours with no manifest
  as STALE. The first delivery window is ~8h for hourly and ~24h for
  daily. Apply the staleness threshold only after the startup window.

- NEVER flag a CUR as CONFIG_GAP for missing `REDSHIFT` or `QUICKSIGHT`
  artifacts. Only `ATHENA` is required for standard FinOps query
  workflows. REDSHIFT/QUICKSIGHT are add-on integrations.

- NEVER recommend deleting and recreating a CUR to fix a config gap.
  Deleting destroys the historical prefix structure and the Glue table
  partition map. Use `aws cur put-report-definition` with the updated
  definition (it overwrites the existing one while preserving S3 history).

- NEVER assume `Format: Parquet` alone means Athena is working. The
  CloudFormation crawler template (`athena_integration/crawler-cfn.yml`)
  must have been executed. Verify with `aws glue get-table` — a missing
  table means Athena queries will fail regardless of the format.

- NEVER treat a missing manifest during the first 2 days of a billing
  period as STALE. AWS re-delivers the entire prior billing period
  during bill-close processing (1st-2nd of each month), causing a
  temporary delivery lag. Check the calendar before flagging.

- NEVER report OK without verifying actual S3 object existence. A CUR
  can show "active" in the API and console while silently failing to
  deliver (deleted bucket policy, wrong region, deleted BillingViewArn).
  The manifest file in S3 is the ground truth — the API is a config
  mirror, not a delivery confirmation.

- NEVER ignore a `BillingViewArn` that points to a deleted or modified
  billing view. This silently stops CUR delivery with no error or alert.
  Check the view exists: `aws billingvisions list-billing-views`.

- NEVER recommend Athena queries without partition filters. CUR data
  is partitioned by `{year}/{month}`. A full-table scan on a large
  account can cost hundreds of dollars in a single query. Always include
  `WHERE year = '...' AND month = '...'` in remediation examples.

- NEVER assume a single CUR definition covers all needs. A payer with
  one CSV-format CUR and no Athena integration has CONFIG_GAP even if
  data is fresh. The completeness dimension is independent of freshness.

- NEVER classify `AccessDeniedException` from `describe-report-definitions`
  as NO_CUR. An IAM permission failure (`cur:DescribeReportDefinitions`
  missing) produces the same empty result as a payer with zero CURs.
  Always verify the caller's IAM policy before reporting NO_CUR — a false
  NO_CUR sends the operator on a pointless CUR-creation workflow.

- NEVER swallow `ThrottlingException` from the CUR API. The CUR endpoint
  has a ~1 TPS limit per payer. For multi-account sweeps, serialize calls
  with 1s delay. Retrying with exponential backoff (2s, 4s, 8s) is safe;
  ignoring the throttle produces empty results that look like NO_CUR.

- NEVER ignore cross-region bucket-policy mismatches. The CUR delivery
  bucket policy grants `s3:PutObject` to
  `billingreports.amazonaws.com` with a `StringEquals` condition on
  `aws:SourceBucketAccount` and a `s3:x-amz-acl` condition. If the
  bucket is in a different region from the CUR's `S3Region`, or if a
  `Condition` key restricts to `aws:SourceIp` ranges that exclude
  AWS billing infrastructure, CUR delivery fails silently — the API
  shows "active" but no objects arrive. Always compare the bucket
  region against `S3Bucket`/`S3Region` in the report definition, and
  verify no `Condition` block excludes billing service principals.

- NEVER overlook S3 lifecycle rules that target the CUR prefix. A
  lifecycle policy with `Expiration` or `NoncurrentVersionExpiration`
  on the CUR prefix silently deletes old CUR objects — including
  manifests and assembly files. This causes historical data gaps that
  look like "CUR was just created" when objects older than the rule's
  `Days` value are gone. Before classifying a CUR as healthy, run
  `aws s3api get-bucket-lifecycle-configuration --bucket <bucket>`
  and verify no rule matches the CUR `S3Prefix`. A common mistake:
  a blanket rule expiring objects after 30 days on the entire bucket
  wipes monthly CUR files before bill-close reprocessing can use them.

## Pre-flight safety checks (run before any remediation CLI)

- **MANDATORY CONFIRMATION GATE.** Before any state-changing operation
  (put-report-definition, delete-report-definition, put-bucket-versioning,
  put-bucket-policy), the auditor MUST emit:
  `CONFIRM: About to <action> on report <name> / bucket <bucket>. This
  affects <consequence>. Proceed? (yes/no)`
- **Back up the current report definition before modifying:**
  `aws cur describe-report-definitions --output json >
  /tmp/cur-backup-$(date +%s).json`
  CUR definitions are overwritten atomically — no rollback without backup.
- **Back up the S3 bucket policy before modifying:**
  `aws s3api get-bucket-policy --bucket <bucket> --output json >
  /tmp/<bucket>-policy-backup-$(date +%s).json`
- **Verify the S3 bucket exists and is writable by CUR:**
  `aws s3api head-bucket --bucket <bucket>` — fail closed if it errors.
- Before enabling S3 versioning on an existing bucket, warn the operator
  that versioning increases storage costs (all object versions retained).
  Recommend adding an S3 lifecycle policy to expire non-current versions
  after 90 days.
- Prefer `put-report-definition` (overwrites in place, preserves S3
  history) over delete+recreate (destroys prefix structure).

## Remediation guidance

### For NO_CUR — no CUR configured

1. Create a CUR with the recommended configuration:
   ```bash
   aws cur put-report-definition --report-definition '{
     "ReportName": "cur-hourly-athena",
     "TimeUnit": "HOURLY",
     "Format": "Parquet",
     "Compression": "Parquet",
     "AdditionalSchemaElements": ["Resources"],
     "S3Bucket": "<your-cur-bucket>",
     "S3Prefix": "cur/",
     "S3Region": "us-east-1",
     "AdditionalArtifacts": ["ATHENA"],
     "RefreshClosedReports": true,
     "ReportVersion": "cur-1.0"
   }' --profile <p>
   ```
2. Ensure the S3 bucket has the CUR delivery policy (grant
   `billingreports.amazonaws.com` PutObject + GetBucketAcl).
3. Enable S3 versioning on the bucket.
4. After ~8 hours, verify delivery:
   `aws s3api list-objects-v2 --bucket <bucket> --prefix cur/cur-hourly-athena/`
5. Run the Athena CloudFormation template that CUR auto-generates at
   `s3://<bucket>/cur/cur-hourly-athena/athena_integration/crawler-cfn.yml`.

### For STALE — data pipeline has stopped

1. Verify the S3 bucket still exists and has the CUR delivery policy.
2. Check if `BillingViewArn` points to a deleted view.
3. Check if the bucket policy was modified (e.g., by a third-party tool).
4. If the bucket is intact, verify the CUR definition:
   `aws cur describe-report-definitions --output json`.
5. If config is intact but no files arrive, open an AWS Support case
   (Billing category) — CUR delivery may have an upstream issue.
6. After the pipeline resumes, verify with:
   `aws s3api list-objects-v2 --bucket <bucket> --prefix <prefix>/
   <report-name>/ --query 'reverse(sort_by(Contents,&LastModified))[0]'`

### For CONFIG_GAP — Step 3a (legacy version)

1. Update the report definition with `ReportVersion: cur-1.0`:
   ```bash
   aws cur put-report-definition --report-definition file://updated-cur.json
   ```
   Include `ReportVersion: cur-1.0` in the definition JSON.

### For CONFIG_GAP — Steps 3b/3c (no Athena)

1. Change `Format` to `Parquet` and add `ATHENA` to `AdditionalArtifacts`.
2. Re-run `describe-report-definitions` to confirm the change took effect.
3. Navigate to the `athena_integration/` prefix and run the
   `crawler-cfn.yml` CloudFormation template to create the Glue table.
4. Verify the Athena table:
   `aws glue get-table --database athenacur --name <report-name>`

### For CONFIG_GAP — Step 3d (no S3 versioning)

1. Enable versioning:
   ```bash
   aws s3api put-bucket-versioning --bucket <bucket> \
     --versioning-configuration Status=Enabled --profile <p>
   ```
2. Add a lifecycle policy to expire non-current versions after 90 days
   to control storage costs.

### For CONFIG_GAP — Step 3e (no Resources)

1. Add `"Resources"` to `AdditionalSchemaElements` in the report
   definition and update via `put-report-definition`.
2. Note: existing historical data will NOT retroactively include
   ResourceId — only data from the update forward will have it.

### For CONFIG_GAP — Step 3f (RefreshClosedReports false)

1. Set `RefreshClosedReports: true` in the report definition.
2. The next billing-period close will trigger a full re-delivery of the
   prior period with corrections applied.

### For OK

1. No remediation required for the current posture.
2. Recommend verifying the Glue crawler runs monthly to add new
   partitions: `aws glue start-crawler --name <crawler-name>`.
3. Recommend adding an S3 lifecycle policy to transition old CUR data
   to Glacier after 12 months if long-term retention is required.
4. Recommend monitoring CUR delivery with a CloudWatch alarm on S3
   `PutObject` events for the CUR prefix (detect staleness early).

## Deep reference: CUR delivery internals

Full internals (manifest structure, Athena integration flow, late-arrival/bill-close processing, payer vs linked restriction): [references/advanced-patterns.md](references/advanced-patterns.md).

## Recent AWS features (2024-2026)

What changed (CUR 2.0 with FOCUS, hourly refresh improvements, Athena with CUR 2.0): [references/advanced-patterns.md](references/advanced-patterns.md).

## References (load on demand)

- [Error handling](references/error-handling.md) - IAM permission errors, API throttling, malformed input, missing-manifest prefix mismatch
- [Advanced patterns](references/advanced-patterns.md) - Step 0 non-obvious CUR behaviors, CUR delivery internals deep reference, recent AWS features

## Domain

AWS CloudOps / FinOps — Cost Visibility and Data Pipeline Health.

## AWS documentation

- **Service documentation** — [AWS Cost and Usage Report User Guide](https://docs.aws.amazon.com/cur/latest/userguide/what-is-cur.html)
- **Security** — [CUR IAM actions, resources, and condition keys (Service Authorization Reference)](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awscostandusagereport.html)
- **API reference** — [AWS Cost and Usage Report API Reference](https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_cur.html)
- **CLI reference** — [AWS CLI `cur` command reference](https://docs.aws.amazon.com/cli/latest/reference/cur/)
- **CUR 2.0 with FOCUS** — [CUR data format](https://docs.aws.amazon.com/cur/latest/userguide/cur-data-format.html)

