SIAgentNews.com
← All news
DevelopingClaude

Amazon Bedrock adds per-user AI cost tracking via IAM tags

AWS now allows companies to see exactly which employees are spending what on AI tools by linking Bedrock usage to specific identities.

· First reported by Amazon Web Services (AWS)

24 hoursTime for tags to appear in billing

The short version

  • Bedrock captures the full IAM identity of every caller, including session names for federated users.
  • Cost data flows automatically into AWS Cost and Usage Reports (CUR 2.0) and Cost Explorer.
  • The system works across multiple tools like Claude Code, ChatGPT Work, and OpenAI Codex.
  • Organizations can use session tags to group spending by team, cost center, or project.

Why it matters

As companies scale AI adoption, it becomes difficult to see which teams are actually generating value versus just consuming budget. This feature gives IT leaders the data needed to set spending limits and plan budgets based on actual headcount usage.

Solving the attribution problem

Many organizations struggle to determine the real per-user cost of AI tools because multiple employees often share a single set of credentials. When everyone uses a shared role, billing data aggregates all activity into one bucket, making it impossible to see which specific developer or knowledge worker is driving the spend.

Amazon Web Services (AWS) addressed this by enabling built-in cost attribution for Amazon Bedrock. The system now traces every inference call back to the specific IAM principal that made it. This happens at the endpoint layer, meaning the tracking works regardless of which specific AI coding or productivity tool the user chooses to run.

By using AWS IAM Identity Center, companies can link external identities from providers like Okta or Microsoft Entra ID to these calls. This allows the platform to capture unique session names and organizational tags. These details then flow into the AWS Cost and Usage Reports (CUR 2.0) and Cost Explorer for easy querying.

How the tracking works

The mechanism operates automatically without requiring any changes to the existing API calls made by AI tools. When a user invokes a model through either the bedrock-runtime or bedrock-mantle endpoints, Bedrock captures the caller’s full IAM ARN. This includes the session name for federated users, which is published to the line_item_iam_principal column in billing data.

Organizations can further enrich this data by passing session tags during the federation process. These tags, such as team or cost center, appear in the billing reports with a specific prefix. This allows administrators to filter and group costs by department or project in the AWS Cost Explorer dashboard with zero extra configuration on the tool side.

While the standard billing report aggregates usage by export interval, users who need finer detail can still use model invocation logs. These logs provide per-prompt token-level detail for workloads that require more granularity than the standard hourly or daily billing exports provide. Companies can combine these methods to see both high-level dollar amounts and specific prompt-level usage.

Supported AI tools

This new attribution method is designed to be universal across various popular AI productivity tools. It covers tools like Claude Code, Claude Desktop, OpenAI Codex, ChatGPT Work, and OpenCode. Because the tracking happens at the Bedrock endpoint level, the specific logic of the tool does not interfere with the data collection.

For example, Claude Desktop and Claude Code can be configured to use the AWS credential chain. Users authenticate once, and the system automatically handles the identity propagation. This ensures that every request made by a developer using these tools is correctly mapped back to their individual identity for billing purposes.

The system also supports different access patterns, including IAM users, per-application roles, and LLM gateways. Whether a company uses a gateway to proxy requests or has developers calling Bedrock directly from their workstations, the identity of the caller remains visible. This provides a consistent way to manage costs across different architectural choices.

Enforcing spending limits

Visibility is only the first step; companies also need ways to prevent uncontrolled spending. AWS provides several mechanisms to enforce limits based on the new per-user data. One of the simplest options is using AWS Budgets with budget actions to apply a deny policy when a specific user's spending threshold is breached.

For more immediate control, organizations can use Amazon CloudWatch alarms and AWS Lambda. These can monitor Bedrock's native metrics, such as input and output token counts, in near-real-time. This approach can reduce enforcement latency to between 1 and 5 minutes, which is much faster than the standard billing update cycle.

A third option for high-precision control involves using Amazon DynamoDB to track quotas at the authentication layer. A Lambda function can increment token counters for each user and withhold credentials once a limit is reached. While this doesn't happen on every individual API call, it ensures that users cannot exceed their allocated budget once their session expires.

Next steps for deployment

To get started, administrators must first configure AWS IAM Identity Center with an external identity provider that supports SCIM provisioning. This allows for the automatic synchronization of users and organizational attributes like department and team. These attributes are then mapped to session tags that flow into the billing reports.

Once the identity source is set, administrators create permission sets that grant specific Bedrock access. Users then configure their workstations with the AWS CLI to establish an SSO session. From that point on, any AI tool pointed at the Bedrock endpoint will automatically include the user's identity in the billing data.

Finally, the organization must enable the Cost and Usage Report (CUR 2.0) with the caller identity option selected. After users make their first calls, the tags will appear in the billing console. From there, teams can use Amazon Athena to query the data or use AWS Quick Sight to create interactive dashboards with anomaly detection.

Try it

Check your AWS Cost and Usage Report (CUR 2.0) settings to see if 'Include caller identity (IAM principal) allocation data' is enabled.

Watch

How the 24-hour billing delay affects real-time budget enforcement for high-velocity users.

Whether more companies adopt the DynamoDB-based quota tracking for stricter per-user limits.

Sources and links

First reported by Amazon Web Services (AWS). Written by the SI Agent News Desk from the reporting above.Written with AI from the source above. Every number is checked against the source. Spot a mistake? Corrections.

Liked it? Say why

Add a line for other readers.

No account needed. We never show your email. Comments with links, ads or abuse are held and not shown. Your comment shows after a quick check.

More AI news