# Attributing and controlling AI tool costs on Amazon Bedrock

- Source: MechNext — https://mechnext.eu/en/article/72-attributing-and-controlling-ai-tool-costs-on-amazon-bedrock
- Published: 2026-11-16
- Updated: 2026-11-16
- Category: Industry News
- Language: en (Markdown in other languages: ?lang=de, ?lang=sk, ?lang=pl, ?lang=zh, ?lang=ru)

> Amazon Bedrock can attribute usage to IAM principals through CUR 2.0, session tags, and workload profiles or projects. The approach also has reporting delays, tool-specific permissions, and several enforcement options with different response times.

Amazon Bedrock records the full IAM ARN of every inference caller in the `line_item_iam_principal` column of Cost and Usage Report 2.0, or CUR 2.0. For federated users, that ARN includes the session name. This attribution does not require changes to API calls, so the caller identity can accompany metered usage without adding application-level instrumentation.

### What CUR 2.0 shows

CUR 2.0 aggregates Bedrock usage by principal and usage type for each hourly or daily export interval. It does not provide the cost of an individual request. The report can therefore show how usage within an export interval is associated with a principal and a usage category, but it should not be read as a request-by-request ledger.

The distinction between usage categories matters because Bedrock meters and bills input tokens, output tokens, cache-read tokens, and cache-write tokens separately. One hour of activity under one IAM principal typically produces four CUR rows. Several rows for the same principal and hour can consequently represent separate token categories rather than several independently priced request records.

### Identity and organizational context

With IAM Identity Center, the assumed-role session name is the user's sign-in name. Each user therefore has a distinct principal. Session tags can enrich that identity with dimensions such as team, cost center, and project. IAM principal tags and federation session tags appear in CUR 2.0 with the `iamPrincipal/` prefix, and they are available in Cost Explorer as filterable dimensions.

These tags have important timing boundaries. An IAM-principal cost allocation tag appears in Billing only after the principal has made a Bedrock call. It can take up to 24 hours to appear and up to 48 hours to reach CUR 2.0 and Cost Explorer. Activation is not retroactive. Recent activity and recently introduced tags must therefore be interpreted with these processing delays in mind.

### Adding a workload dimension

Caller attribution can be combined with workload-level tagging. Application Inference Profiles can tag workload spend on `bedrock-runtime`. When `bedrock-mantle` is used, Projects and Workspaces can isolate and tag spend. The principal identifies the caller, while the relevant profile, project, or workspace provides a separate way to organize expenditure around a workload.

This separation is useful when reading the resulting cost data: principal aggregation answers who incurred usage during the export interval, while workload tags identify the associated organizational grouping supported by the relevant Bedrock interface. Neither changes the fact that CUR 2.0 remains aggregated by interval and usage type rather than exposing per-request cost.

### Permissions differ by tool and interface

Codex and ChatGPT Work require `bedrock-mantle:CreateInference` and related actions scoped to a Project when they use `bedrock-mantle`. Claude Code and Claude Desktop, when using `bedrock-runtime`, require `bedrock:InvokeModel` and `bedrock:InvokeModelWithResponseStream` scoped to the relevant model or inference-profile ARNs.

The credential path also determines the recorded identity. If `AWS_BEARER_TOKEN_BEDROCK` is set, Claude Code and Codex use the key instead of the SSO credential chain. Their calls are then attributed to the IAM user behind that key. A report will thus reflect the credential that actually made the call, even if an SSO-based identity was otherwise expected.

### Export configuration is required

CUR 2.0 must be configured with the caller-identity allocation option for `line_item_iam_principal` to be populated. An export created before IAM principal attribution became available must be replaced with a new export that uses this option. Merely retaining an older export does not supply the principal data required for this attribution model.

Configuration and timing are separate concerns. The caller-identity option enables the principal column, while tag appearance and delivery remain subject to the stated delays. Together with hourly or daily aggregation, these boundaries define what can be observed in billing data and when it becomes available.

### Controls have different response times

AWS Budgets can trigger an action, such as applying a deny policy, when a tag-filtered threshold is breached. Budget updates and billing-data delays can nevertheless allow a high-velocity user to overshoot by up to a day. This makes a budget action a delayed cost control rather than an immediate decision on each invocation.

CloudWatch alarms and Lambda can enforce limits using Bedrock metrics with a stated latency of 1–5 minutes. An LLM gateway can go further and block individual invocations, but it adds operational complexity and per-request latency. These choices represent different positions between billing-driven enforcement, minute-scale metric-driven enforcement, and invocation-level blocking.

The [primary AWS source](https://aws.amazon.com/blogs/machine-learning/cost-attribution-and-controls-for-ai-developer-and-productivity-tools-on-amazon-bedrock) presents these elements as a connected approach: CUR 2.0 supplies principal-based aggregated usage, tags add organizational and workload context, and Budgets, CloudWatch with Lambda, or an LLM gateway provide controls with distinct timing and operational characteristics.
