LLM cost attribution is the practice of allocating inference spend to specific teams, projects, workflows, or use-cases in billing and financial reporting systems. Without attribution, enterprise AI inference cost is a single line item — opaque to the CFO, unactionable for engineering teams, and impossible to connect to business value.
The problem is structural. A single API key or IAM role shared across teams produces one aggregate cost number. A gateway routing traffic for ten teams through one credential looks identical to one team using it all. Attribution requires deliberate instrumentation at the call level — tagging, session identity, or virtual keys — and a reporting layer that surfaces those tags in billing data.
Attribution is a prerequisite for AI FinOps, chargeback, and the “cost per completed task” metric that connects inference spend to ROI.
Why this matters to mid-market buyers
- You cannot govern what you cannot attribute. Token budget enforcement, model routing decisions, and cost-per-use-case ROI calculations all require attribution data as their input. Organizations that skip attribution in the early deployment phase discover the gap 12–18 months later when spend has scaled and retroactive attribution is expensive.
- AWS CUR 2.0 now supports IAM principal attribution for Bedrock, but the feature is forward-looking. The
INCLUDE_IAM_PRINCIPAL_DATAconfiguration was launched April 8, 2026. There is no retroactive data for calls made before that date on a CUR export that did not have the feature enabled. Enabling it now is the only path to attributed billing data going forward. - The finest grain available in AWS billing is per-usage-type per day, not per-request. CUR contains no
requestId. Per-prompt attribution requires invocation logs (near real-time, S3), not CUR. The two systems serve different purposes: CUR for invoice reconciliation and chargeback, invocation logs for debugging and request-level audit.
The Three Attribution Mechanisms (AWS Bedrock)
IAM principal attribution (recommended for dollar chargeback)
AWS records the caller IAM identity on every bedrock-runtime call and maps principal tags to Cost Explorer and CUR 2.0. No changes to LLM API calls are required — only IAM configuration.
Static role per project: Create one IAM role per team or project, tag it with team, cost-center, project. All Bedrock calls from that role flow to CUR 2.0 with iamPrincipal/team tag.
STS session tags (multi-tenant gateways): When a single LiteLLM gateway role serves multiple teams, use AssumeRole with per-tenant RoleSessionName and session tags. The resulting ARN (assumed-role/gateway-role/tenant-name) flows into line_item_iam_principal. Cache credentials by tenant — STS default quota is 500 calls/sec/account and credentials are valid up to 12 hours.
Activation requirement: Tag keys must be activated as cost allocation tags in the AWS Billing console. Up to 24-hour propagation delay. Data is forward-looking from activation date only. New-tenant visibility lag from first API call to first populated CUR row: up to 72–96 hours.
Limitation: Covers bedrock-runtime endpoint only. Not available for Bedrock Agents, Knowledge Bases managed APIs, or the bedrock-mantle (Responses/Anthropic Messages) endpoint.
Request metadata attribution (per-prompt detail, not billing)
Pass requestMetadata key-value pairs on each Bedrock Converse call (LiteLLM ≥ 1.53, PR #14570, September 2025). Up to 16 key-value pairs per call; keys and values max 256 chars.
These appear in Bedrock model invocation logs (S3, near real-time) as requestMetadata. They do not appear in CUR. Use this mechanism for per-prompt audit trails, debugging, and cost estimates — not for invoice-accurate chargeback.
Athena queries over the invocation log table enable per-team token counts by day, model, and metadata value. Joining invocation logs to CUR at the (model × day) grain produces proportional cost allocation — not exact per-request dollars, but defensible estimates for internal chargeback.
Gateway internal spend logs (near-real-time quota enforcement)
LiteLLM records per-request spend in LiteLLM_SpendLogs (PostgreSQL). Fields: team_id, user, model, spend (rate-card price), prompt_tokens, completion_tokens, startTime, request_id. One virtual key per team or project; query spend by team via /global/spend/report?group_by=team.
Critical caveat: LiteLLM calculates spend using its own rate card, not the AWS invoice. Rates drift with reserved capacity, batch pricing, or negotiated rates. Use SpendLogs for quota enforcement and real-time allocation; reconcile to CUR for invoice accuracy.
What CUR 2.0 Contains (and Does Not Contain) for Bedrock
| Available in CUR | Not in CUR — use invocation logs |
|---|---|
| Per-model per-usage-type daily cost | Per-request requestId |
| Input, output, cache read, cache write token counts (separate line items) | Per-request token counts |
IAM principal ARN (with INCLUDE_IAM_PRINCIPAL_DATA = TRUE) |
requestMetadata key-value tags |
IAM principal tags (iamPrincipal/team, etc.) |
Latency per request |
Resource tags from application inference profiles (resourceTags/project) |
Prompt content |
| Savings Plan coverage | Cross-region inference routing destination |
Four token types must all be summed for accurate reconciliation. Cache read tokens cost approximately 0.1× input price; cache write tokens cost approximately 1.25× input price. Workloads using prompt caching that only sum input + output tokens will not match their bill.
The FOCUS Standards Gap
FOCUS 1.1–1.4 (the FinOps Foundation cloud billing standard) has no native LLM-specific fields — no token count columns, no model name columns, no inference-type columns. Token-level Bedrock cost lives in AWS-proprietary x_UsageType and x_Operation columns appended to AWS FOCUS exports.
FOCUS 1.5 (planned, no confirmed date — estimated mid-2027) is explicitly scoped to add AI model identity and token consumption to the Cost and Usage dataset. Until 1.5 ships, every FOCUS-based AI cost approach relies on vendor-specific extensions or out-of-band log joins.
The Linux Foundation’s Tokenomics Foundation (announced June 3, 2026) will develop companion standards and benchmarks for AI cost tracking, potentially accelerating convergence with OpenTelemetry GenAI semantic conventions.
Retroactive Attribution
No single AWS mechanism retroactively attributes untagged Bedrock spend to projects at request granularity.
AWS Cost Categories can apply rule-based labels to CUR line items up to 12 months retroactively — but only using dimensions that were present at billing time (IAM role ARN, account, usage type, region). If no IAM principal tags were attached to roles at the time of the calls, retroactive attribution cannot synthesize values that were never written.
IAM principal data is not retroactive. The INCLUDE_IAM_PRINCIPAL_DATA CUR 2.0 configuration only populates data from the date the new export starts. Existing exports cannot be patched.
Invocation logs (if enabled) allow reconstruction of per-request attribution using identity.arn and requestMetadata fields already written to S3. This gives token-level estimates, not invoiced dollars.
Supporting research
- research/19-agent-frameworks/aws-cur-bedrock-token-finops-2026.md — CUR 2.0 complete field guide; column structure, usage type patterns, IAM principal formats, Athena query library (6 queries), CUDOS dashboard coverage, attribution decision matrix
- research/19-agent-frameworks/aws-bedrock-cost-attribution-retroactive-2026.md — retroactive attribution playbook; what is and is not retroactively possible; Cost Categories; invocation log reconstruction; LiteLLM SpendLogs reconciliation bridge
- research/19-agent-frameworks/focus-finops-ai-llm-bedrock-2026.md — FOCUS 1.1–1.4 gap analysis; FOCUS 1.5 roadmap; AWS vendor extensions that fill the gap today; Tokenomics Foundation context
- research/19-agent-frameworks/litellm-production-deployment-2026.md — LiteLLM SpendLogs as internal chargeback; virtual key budget enforcement; Bedrock inference profile and IAM session tag integration; STS AssumeRole caching pattern
See also
- agentic-token-governance — organizational governance layer; token budgets, priority tiers, model routing
- ai-gateway — the control plane that enables attribution by routing all traffic through one instrumented layer
- inference-economics — unit cost structure and inference cost curve
- ai-implementation-cost-structure — enterprise AI TCO; attribution feeds the CFO-level cost view
- ai-budget-cfo-decisions — how CFOs structure AI spending; attribution data is the input CFOs require for multi-year budget defense