Lifestyle
Amazon Bedrock Tracks Per-User AI Dev Tool Costs by IAM Principal, Feeding CUR 2.0 and Cost Explorer
AWS says tools such as Claude Code and Codex that call models through Amazon Bedrock can attribute each inference to an individual user via IAM Identity Center, carrying team tags into CUR 2.0 and Cost Explorer. It also describes several ways to control usage.
News date: About 7 min read
Contents
In an official blog post, AWS explains that AI development and productivity tools that call models through Amazon Bedrock can trace each inference (a single request sent to an AI model) to the IAM principal that made the call, and send identity and organizational tags into CUR 2.0 and AWS Cost Explorer. IAM is the AWS service for managing identity and access, and an "IAM principal" is the identity that actually made the call (for example a user or a role). CUR 2.0 is the AWS Cost and Usage Reports, and Cost Explorer is the AWS tool for viewing spend. AWS says the mechanism works at the endpoint layer (the Bedrock addresses that tools send their requests to, beneath any tool-specific logic), so Claude Code, Claude Desktop, OpenAI Codex, ChatGPT Work and OpenCode are covered once identity pass-through is set up a single time. For enterprises that need to keep track of AI tool spending, this means spend can be viewed by person and team without building separate metering for each tool.
How does Bedrock cost attribution work?
According to AWS, Bedrock records the full IAM ARN of the caller for every inference (the name AWS uses to identify resources and identities, including the session name for federated users, meaning people who sign in through an outside identity provider) and publishes it to the line_item_iam_principal column in CUR 2.0. AWS says you can optionally attach tags to IAM principals or pass session tags at federated sign-in; these tags appear in CUR 2.0 with an iamPrincipal/ prefix and become filterable dimensions in Cost Explorer.
AWS points out that if all users assume the same role with the same fixed session name, or calls go through the gateway's own role, CUR aggregates spend under a single principal. With IAM Identity Center, the session name is the user's sign-in name, so each user has their own principal. AWS also says the mechanism supports four access patterns: IAM users, per-application roles, federated identities and LLM gateways, with the post focusing on the federated pattern.
What prerequisites and setup steps are needed?
The prerequisites AWS lists are: an AWS account with Bedrock permissions, IAM Identity Center enabled in the management account, an external identity provider that supports SCIM (a mechanism that automatically syncs users and groups) such as Okta, Microsoft Entra ID or Ping Identity, AWS CLI v2 on developer machines, CUR 2.0 with IAM principal data enabled and delivered to S3, cost allocation tags activated from the payer account, and an Athena table that can query CUR 2.0.
- In IAM Identity Center, set the external identity provider as the identity source, and under "Attributes for access control" map organizational attributes to session tags (such as Team and CostCenter).
- Create a permission set that grants Bedrock invocation permissions; AWS says bedrock-mantle tools need actions such as bedrock-mantle:CreateInference, and bedrock-runtime tools need bedrock:InvokeModel and bedrock:InvokeModelWithResponseStream.
- Users configure an SSO (single sign-on) profile in the AWS CLI and sign in with aws sso login --profile bedrock.
- Point each tool at Bedrock; the post provides configuration examples for Claude Desktop, Claude Code and Codex.
- In the Billing Console, create a CUR 2.0 export (Parquet, hourly or daily), select "Include caller identity (IAM principal) allocation data", and activate the Team and CostCenter cost allocation tags.
- Query with Athena and visualize through Cost Explorer, Quick Sight, CUDOS or Grafana.
How do the usage control options differ?
AWS says that once attribution is in place, organizations also need enforcement mechanisms to keep spending from running away, and each approach trades off enforcement latency against operational complexity. The table below summarizes AWS's description of four approaches.
| Approach | Enforcement latency / when it takes effect | Characteristics described by AWS |
|---|---|---|
| AWS Budgets actions | Updates up to three times a day; Bedrock charges can take up to 24 hours to post, so heavy users may overspend by up to a day | Lightest weight, no infrastructure to build; can set thresholds by IAM principal tag and apply deny policies |
| CloudWatch alarm plus Lambda | 1–5 minutes | Uses the InputTokenCount, OutputTokenCount and Invocations metrics; user-level tracking requires Application Inference Profiles or per-user roles |
| DynamoDB quota tracking | Takes effect at the next credential refresh, not on every API call | Enforced at the authentication layer, avoiding billing-data delay; no credentials are issued once the limit is exceeded |
| LLM gateway proxy | Blocks call by call | Highest operational complexity, and adds latency to every request |
AWS says organizations typically layer these approaches: CUR 2.0 for reporting, a gateway or DynamoDB for real-time control, and AWS Budgets as a backstop.
How can usage on Anthropic-hosted services be viewed?
AWS explains that inference for Claude Platform on AWS and Claude for Enterprise is processed on Anthropic-managed infrastructure. Usage for Claude Platform on AWS can be viewed in the Anthropic admin console by workspace and API key, and its workspace tags flow into AWS billing. Individual user usage for Claude for Enterprise can be viewed in the Anthropic admin console and the Usage and Cost API, with spend limits enforced natively by Anthropic.
Frequently asked questions
Can I see the cost of each individual prompt?
According to AWS, CUR does not contain per-request cost; it aggregates by principal and usage type in each export interval. For per-prompt detail, AWS suggests using model invocation logs or request metadata tags.
Does this approach only work for Claude tools?
AWS says no. Claude Code, Claude Desktop, OpenAI Codex, ChatGPT Work and OpenCode all use the same attribution mechanism as long as they call Bedrock through bedrock-runtime or bedrock-mantle.
Why do multiple rows appear in CUR for one hour?
AWS explains that Bedrock meters and bills input, output, cache read and cache write tokens separately, so an hour of activity for one IAM principal typically produces four CUR rows.
Can I adopt only part of this first?
AWS says the components can be adopted incrementally: connect the identity provider and assign the Bedrock permission set to get session-level attribution in CloudTrail immediately, then activate cost allocation tags to reach CUR 2.0, and later add Athena queries, dashboards and usage controls as needed.
Browse the latest news in this topic
Found this guide helpful? Share it with someone who needs it
Lifestyle
GitHub Copilot adds strictPluginOnlyCustomization: enterprise admins can limit 5 types of customization to plugins or managed settings, for Copilot Business and Enterprise
GitHub announced that enterprise admins can now require Copilot skills, custom agents, hooks, MCP servers and executable extensions to come only from plugins or managed settings. The control applies to members with Copilot Business or Enterprise licenses on GitHub Enterprise Cloud.
Lifestyle
AI Security Startup Corma Raises $125M Series A at $1B Valuation, Led by NEA
According to TechCrunch, about three months after introducing its product, Corma announced a $125M Series A led by NEA at a $1B valuation. The company offers AI models and agents trained specifically for cybersecurity defense.
Lifestyle
NVIDIA Launches DGX Spark HPC Developer Kit: Four-Node Ring Cluster, 512GB Memory, Now on Sale
At SC26, NVIDIA unveiled the DGX Spark HPC Developer Kit, built from four DGX Spark systems with 512GB of combined memory and 20TB of NVMe. The kit can be purchased now; the HPC SDK installation playbook is still to come.
Lifestyle
Amazon Bedrock Managed Knowledge Base Agentic Retrieve Adds AgentCore Memory: Restore Conversations in One Call and Filter Documents by User ACL
AWS explains that adding memoryConfiguration to AgenticRetrieveStream lets a Bedrock Managed Knowledge Base use AgentCore memory, with userContext applying document ACLs. The integration is opt-in, and the memory resource must be in the same account as the knowledge base.
Sources
Compiled from the references and verification dates listed above; fares, schedules, product features, and terms can change, so please confirm the latest details on the relevant official website before travelling, booking, or purchasing.