explainx.ai350K+ learn from us
TrendingAI News TodayPathwaysSkills
Pricing
explainx.ai

Upskill in AI — 16 free pathways, live workshops & bootcamps, and 50+ courses from practitioners. Plus the skills, tools, and MCP servers to practice on.

follow us

follow on google

Add explainx.ai as a preferred source

corporate training

support@explainx.ai

get started

Find your pathTake Free Evaluation

community

Join the community

learn

mind: share how you thinkpathways — start freeworkshopsbootcampscoursescompare Explainxcertificationsmock testsexplainx universitycorporate traininglearn skills & mcp

discover

skillsmcp serversexplainx mcpestacktoolsmdx readeragentsllmsdesignsdictionarypeopleagi trackerfelony benchranks

company

aboutvisionmissionteaminstructorsteach on explainxpartnershipscommunityhackathonscareers

content

daily AI newsstate of AI — live resultsblogreleasespromptsgeneratorsresource libraryfor LLMsexplainx.ai kids

solutions

all solutionsdeveloper upskillingmarketing upskillingproduct manager upskillingleadership upskilling

newsletter · weekly

Get AI news, tools, and insights in your inbox.

supportcontactprivacytermsdata rightshow we create contentsubmission guidelines

© 2026 AISOLO Technologies Pvt Ltd

explainx.ai

On this page

  • TL;DR
  • Where it fits
  • The three parts
  • Prerequisites
  • Walkthrough
  • The token-counting mistake
  • How the three AWS posts fit together
  • Pitfalls to plan for
  • Gateway or tags?
  • Checklist
  • Caveats
  • Related reading
← Back to blog

explainx / blog

Track and Cap Amazon Bedrock Spend Per IAM Principal With CUR 2.0 and AWS Budgets

AWS, Amazon Bedrock, FinOps, IAM, Cost Management

Part of Microsoft, Apple and Amazon AI

AWS explains how to attribute Amazon Bedrock cost to each IAM user or role with tags and CUR 2.0, then cap it with AWS Budgets actions that attach a Deny policy, with no custom code. Steps, delays and cautions.

Nov 12, 2026·8 min read·Yash Thakker
add explainx.ai
go deep
Track and Cap Amazon Bedrock Spend Per IAM Principal With CUR 2.0 and AWS Budgets

AWS says you can attribute Amazon Bedrock spend to each IAM user or role, and cap it, using only AWS-native features and no application code. The walkthrough is Tokenomics at scale, published November 12, 2026 by Arun Chandapillai, Aditya Mettu, Andre Bernardo, Andrew Dunham, Levi McCormick and Cami Persson. It is rated Advanced (300). The page we could read was truncated partway through the enforcement step, so we note below where our coverage stops.

The motivation is simple. Before leadership widens AI access, they usually ask what each person or team spends, whether it can be capped, and how much work that takes. This post answers the last question with "configuration, not code."

TL;DR

table · 2 cols
PartWhat AWS says
AttributeBedrock records the IAM principal for each inference request automatically
ReportActivate tags as cost allocation tags; use Cost Explorer or a CUR 2.0 export with Athena
EnforceAWS Budgets action attaches a Deny IAM policy at the threshold
DelaysUp to about 24 hours for the tag key, up to 24 more for billing data; not retroactive
Common errorLeaving out cache read and write tokens
Code neededNone for the common case

Where it fits

AWS says its earlier post described a custom enforcement loop built on IAM Identity Center, Amazon Athena over Bedrock model invocation logs and AWS Lambda. That design gives near-real-time control but needs code the customer owns and operates. The new post targets the same outcome with native features. The trade-off is time: billing data lags, so a cap may fire later than a code-based loop would. For a look at the invocation-log approach, see our post on the Bedrock tokenomics data lake.

The three parts

  1. Attribute. Bedrock automatically records the IAM principal, a user or role, for each inference request, with no change to your calls.
  2. Report. Activate the tags as cost allocation tags, then view data in Cost Explorer or in a CUR 2.0 export queried through Athena.
  3. Enforce. Create an AWS Budget scoped to Bedrock and filtered to an identity or tag value. A budget action then attaches a Deny IAM policy when the threshold is crossed.

Prerequisites

You need an AWS account with Bedrock model access, permission to tag principals, activate cost allocation tags, create data exports and create budgets and budget actions, and Bedrock access through IAM roles or users. The AWS CLI should be configured. A CUR 2.0 export with an S3 bucket and Athena are optional. Billing console access is managed separately from most IAM permissions, so check it early.

Walkthrough

Step 0: check what you already have. Open Cost Explorer, filter to Bedrock and group by the identity dimensions that are available. If each user or app already has its own role, this may be enough.

Step 1: map identity to tags.

  • One role per person or app: put static principal tags on the role, for example user, team and CostCenter, in the console or with aws iam tag-role.
  • Shared role or gateway: use session tags passed when the role is assumed. The trust policy must allow sts:TagSession. Tags can pass through sts:AssumeRole --tags, AssumeRoleWithWebIdentity with an OIDC token claim, or AssumeRoleWithSAML with SAML PrincipalTag:* attributes. A session tag overrides a principal tag with the same key, and each principal supports up to 50 tags.

Step 2: activate the tags. In the Billing console, filter cost allocation tags by the IAM principal type and activate them. In an AWS Organization, activation must happen from the management account. A tag key appears only after the principal has made at least one Bedrock call. Propagation can take up to about 24 hours to show the key, plus up to another 24 hours after activation before billing data populates. Activation is not retroactive.

Step 3: create the CUR 2.0 export. Create a Standard export with "Include caller identity (IAM principal) allocation data," hourly granularity, Athena integration in Parquet format and an S3 destination. Run the delivered setup script to create the Glue table, because the console does not do it automatically. Existing exports do not gain identity data retroactively. Tag columns use prefixes such as iamPrincipal/ and resourceTags/. AWS points to sample queries in the aws-samples/sample-cur-iam-principal-bedrock-tracking repository.

Step 4: read the data. In the console, filter Cost Explorer to Bedrock and group by a tag key. In SQL, an Athena query groups line_item_unblended_cost by iamPrincipal/team and line_item_usage_type, filtered on the Bedrock service codes AmazonBedrock and AmazonBedrockService and on a billing period. The table name comes from the setup script, and the billing-period column may differ between exports.

Step 5: enforce. AWS Budgets with budget actions attaches a Deny policy to a specific IAM user, group or role, which isolates an individual's access when the threshold is crossed. The rest of this step was cut off in the source we read, so follow the full AWS post for details such as how and when access is restored.

The token-counting mistake

AWS's most practical caution concerns totals. Count all four token types: input, output, cache read and cache write. Each is a separate line item, and omitting cache tokens undercounts spend, especially with prompt caching. Pricing varies by token type, service tier and whether cross-Region inference was used, so match rates to line items, not only to model names. This echoes the point in AWS's companion post on cost per task, not per token.

How the three AWS posts fit together

This is the first of three Bedrock posts AWS published the same day. This one answers "who spent what, and can we stop them." The second, on cost per task and agent ROI, answers "why is this workflow expensive and is it worth it." The third, on a self-service gateway with LiteLLM, shows one way to hand developers keys with budgets attached. Read in that order, they move from attribution to value to developer experience.

A small example shows the tag approach in use. A company gives each of three product teams its own role and tags each role with team and CostCenter. After the delay, Cost Explorer shows Bedrock cost by team. Finance then creates one budget per team, filtered to that team's tag, with an action that attaches a Deny policy at 100 percent. The company adds a lower alert threshold first so the team lead hears about a problem before access stops. That example is ours, built from the steps above, not an AWS case study.

Pitfalls to plan for

  • Delay. With up to about 24 hours for the key and up to 24 more for billing data, a tag you activate today will not drive a budget tomorrow morning. Activate early.
  • No back-fill. Neither tags nor existing exports gain identity data retroactively. Spend before activation stays unattributed.
  • Shared roles. Without session tags set in your identity provider and trust policy, a shared role shows as one spender.
  • Management account. In an AWS Organization, activation must happen there, which may need a request to another team.
  • Blunt enforcement. A Deny policy blocks the principal. Decide in advance who is told, who can lift it, and whether a team lead should get a warning at a lower threshold first.

Gateway or tags?

Two AWS patterns now cover the same need from different sides. This tag-and-budget approach uses billing data and IAM. The LiteLLM gateway pattern puts a proxy in front of Bedrock and enforces per-key budgets as requests arrive, returning an HTTP 429 when a key goes over. The gateway reacts in real time but is another service to run. The tag approach is serverless and native but reacts on billing time. A large organization may use both: tags for accountability and finance, and a gateway for developer experience.

If you run agents on AWS, the same attribution question applies to them. Our posts on the agent registry with CloudTrail and EventBridge and the Trovata treasury agents show agent workloads that would need the same principal tagging.

Checklist

  1. Check Cost Explorer first; per-role attribution may already be enough.
  2. Decide whether you need one role per person or session tags on a shared role.
  3. Activate cost allocation tags now, from the management account if you use Organizations.
  4. Create a CUR 2.0 export with caller identity data and run the setup script.
  5. Sum all four token types and match rates to usage-type line items.
  6. Create a Bedrock-scoped budget with a Deny action, and write down who can lift it.
  7. Test with a low threshold on a test principal before you apply it to people.

Caveats

This is vendor guidance, and we read it only up to the enforcement step. We have not run the setup, and we saw no data on how quickly a budget action fires in practice. Check current AWS documentation for the exact tag and export options in your account and Region.

Related reading

  • AWS Part 2: Bedrock cost per task, not per token
  • Four Bedrock inference knobs that move token bills (Nov 12)
  • Self-service LLM gateway on Bedrock with LiteLLM
  • Amazon Bedrock tokenomics data lake
  • AWS agent registry with CloudTrail and EventBridge
  • Trovata treasury agents on Bedrock AgentCore
  • Claude Code token efficiency and prompt cache guide

This post reflects the AWS article available on November 12, 2026.

Spotted something out of date? Let us know.
Daily briefFrom Yash · 350K+ students taught

Catch up on AI

One AI story explained in plain English, plus one thing to try. Every day, free. Unsubscribe anytime.

  • ✓ Free
  • ✓ One email a day, no spam
  • ✓ Unsubscribe anytime
Yash Thakker

Written by

Yash Thakker

Yash is an AI expert with over 300K learners. Join his workshops →

View Yash Thakker in People in AI →

Related posts

Nov 12, 2026

AWS Says Measure Cost Per Task, Not Per Token: Bedrock Agent Cost and ROI Guide (Part 2)

On November 12, 2026 AWS published Part 2 of its Bedrock spend series. Its core claim is that token price is the wrong unit: a model with double the list price can cost 65% less per task. This guide walks through the four hidden cost drivers, the formulas for cost per successful task, the levers AWS recommends, and how it says to prove an agent beats the human process.

Nov 12, 2026

Amazon Bedrock: Four Request Settings That Change Your Inference Bill

On November 12, 2026 AWS published measured tests for four Amazon Bedrock inference choices that change token counts and rates even when your prompt stays the same—cache duration, Flex service tier, adaptive thinking effort, and maxTokens. This guide translates the tables into decisions for agents, eval harnesses, and multi-tenant apps.

Nov 10, 2026

Trovata Treasury Agents on AWS Bedrock AgentCore: Enterprise RBAC Patterns

Trovata evolved from generative AI for treasury in 2023 to autonomous agents in production on Amazon Bedrock and AgentCore, AWS wrote on November 10, 2026. The post details chat, insights, scheduled agents, an agent builder, and enterprise RBAC over multi-bank data. Here is what financial teams can copy—and what still needs your own compliance review.