# Amazon Bedrock adds per-user cost attribution for AI developer tools

published: 2026-11-14T07:05:34.298Z
topic: payments
source: https://aws.amazon.com/blogs/machine-learning/cost-attribution-and-controls-for-ai-developer-and-productivity-tools-on-amazon-bedrock/
url: https://aiagentnews.io/stories/amazon-bedrock-adds-per-user-cost-attribution-for-ai-developer-tools

Amazon Bedrock records the IAM identity of each inference caller and publishes it to AWS Cost and Usage Reports (CUR 2.0) in the line_item_iam_principal column, so per-user spend can be queried without changing API calls. The post walks through configuring IAM Identity Center with an external identity provider, session tags, Athena queries and several spending-control options.

Bedrock attributes usage at the endpoint layer, so tools that call the bedrock-runtime or bedrock-mantle endpoints, including Claude Code, Claude Desktop, OpenAI Codex and ChatGPT Work, get per-user cost visibility once identity propagation is set up. Per-user identity comes from the session name of federated users, and optional session tags such as team and cost center appear in CUR 2.0 and Cost Explorer with the iamPrincipal/ prefix. CUR does not contain per-request cost, so per-prompt detail requires model invocation logs or request metadata tagging.

The setup uses IAM Identity Center connected to an external identity provider such as Okta, Microsoft Entra ID or Ping Identity, with SCIM provisioning. A permission set grants bedrock-mantle or bedrock invocation actions, and each developer's AWS CLI profile signs in through aws sso login. Cost allocation tags must be activated from the management account after a user has made at least one Bedrock call, and they can take up to 48 hours to appear in CUR 2.0 and Cost Explorer.

For enforcement, the post compares three options: AWS Budgets with budget actions, which updates up to three times a day; CloudWatch alarms with Lambda, which the post says can enforce within 1 to 5 minutes; and a DynamoDB-based quota check at the credential layer. An LLM gateway gives per-invocation blocking at the highest operational cost. The authors suggest layering these, using CUR 2.0 for reporting and a gateway or DynamoDB checks for real-time control.

## Why it matters if you build agents

If your agents or coding tools call Bedrock with individual SSO sessions rather than a shared role or static API key, you can get per-user spend in CUR 2.0 without changing your API calls. Setting AWS_BEARER_TOKEN_BEDROCK, which the post says attributes calls to the IAM user behind the key, disables this per-user attribution.

Budget-based limits can overshoot by up to a day because Bedrock charges can take as long as 24 hours to appear in billing data, so teams that need tighter control should plan for CloudWatch- or gateway-based enforcement.
