Cost attribution and controls for AI developer and productivity tools on Amazon Bedrock Amazon Bedrock now provides built-in, zero-instrumentation cost attribution that records the full IAM ARN of every inference caller, including the session name for federated users, and publishes it to AWS Cost and Usage Reports (CUR 2.0) in the line_item_iam_principal column. The mechanism operates at the bedrock-runtime and bedrock-mantle endpoint layer, so tools including Claude Code, Claude Desktop, OpenAI Codex, ChatGPT Work and OpenCode inherit per-user cost visibility once IAM Identity Center is configured with an external identity provider. Session tags such as team and cost center flow into CUR 2.0 with the iamPrincipal/ prefix and appear as filterable dimensions in AWS Cost Explorer, while usage is aggregated per principal and per usage type for each export interval (one hour in an hourly export, one day in a daily export) rather than per request. Artificial Intelligence https://aws.amazon.com/blogs/machine-learning/ Cost attribution and controls for AI developer and productivity tools on Amazon Bedrock Amazon Bedrock provides built-in, zero-instrumentation cost attribution that traces every inference call back to the IAM principal that made it. The identity flows along with organizational tags, into AWS Cost and Usage Reports CUR 2.0 and AWS Cost Explorer while keeping data inside the AWS security boundary. This post shows you how to use these capabilities to answer three questions that every FinOps and AI Platform leader asks as AI tool adoption scales: What is the real per-user cost? Which teams generate the most spend, and does that spend correlate with the value they deliver? How should next year’s budget scale with headcount and adoption? The approach works identically regardless of which AI coding or productivity tool makes the call. Claude Code, Claude Desktop, OpenAI Codex, ChatGPT Work, and OpenCode all invoke Amazon Bedrock through one of two inference endpoints: bedrock-runtime or bedrock-mantle , and Bedrock’s attribution mechanism operates at the endpoint layer, beneath any tool-specific logic. You configure identity propagation once, and every tool that routes inference through Bedrock inherits per-user cost visibility automatically. By the end of this post, you will have AWS IAM Identity Center configured with your external identity provider for per-user attribution, session tags team, cost center flowing into CUR 2.0, Amazon Athena queries and dashboard options for ongoing cost visibility, and a clear understanding of Bedrock-native usage controls to enforce spending limits. How Amazon Bedrock attribution works Amazon Bedrock records the IAM identity of every inference caller with no changes required to your API calls. When a user invokes a model through either the bedrock-runtime or bedrock-mantle endpoint, Bedrock captures the caller’s full IAM ARN, including the session name for federated users and publishes it to CUR 2.0 in the line item iam principal column. In billing data, usage is aggregated per principal and per usage type for each export interval: one hour in an hourly export, one day in a daily export. CUR does not contain per-request cost. For per-prompt detail, use model invocation logs or request metadata tagging. Optionally, you can attach tags to IAM principals or pass session tags during federation to add organizational dimensions. These tags appear in CUR 2.0 with the iamPrincipal/ prefix and in Cost Explorer as filterable dimensions. The mechanism supports four access patterns: IAM users, per-application roles, federated identities, and large language model LLM gateways proxying to Bedrock. For a comparison of all four, see Introducing granular cost attribution for Amazon Bedrock https://aws.amazon.com/blogs/machine-learning/introducing-granular-cost-attribution-for-amazon-bedrock/ . This post follows the federated identity pattern, which is the natural fit for AI coding and productivity tools where each developer or knowledge worker authenticates individually. Amazon Bedrock offers additional attribution mechanisms beyond IAM principal tracking that organizations can layer depending on their needs see Appendix A for a comparison . With Application Inference Profiles, you can tag spend by workload on the bedrock-runtime endpoint. With Projects and Workspaces, you can isolate and tag spend on the bedrock-mantle endpoint. Per-request metadata tagging provides per-prompt token-level detail in model invocation logs for workloads that need granularity finer than finer than CUR 2.0’s per-usage-type aggregation per export interval. You can combine these, for example, IAM principal attribution for per-user dollars on your invoice alongside per-request metadata tags for per-prompt detail in logs. The choice depends on your goal see Track usage and costs in Amazon Bedrock https://docs.aws.amazon.com/bedrock/latest/userguide/cost-management.html . The attribution problem The developer and productivity tools run on each user’s machine and call Amazon Bedrock directly, or through an LLM gateway. Users authenticate by assuming a shared IAM role, so every API call appears as assumed-role/