AWS shows how to cap Bedrock spending per employee without writing code
When companies roll out AI, the finance director quickly asks who is spending what and whether it can be limited. AWS offers an answer that requires no custom code: Bedrock itself records which IAM role or user made each request, tags carry that identity into billing, and AWS Budgets disables expensive models once a threshold is crossed. This is simpler than Jamf's custom setup, but not real-time: budgets update up to three times a day.
AI-processed from AWS Machine Learning Blog; edited by Hamidun News
As soon as a company gives employees access to generative AI, the token bill stops being abstract. The finance director wants to know how much each person or team spends, whether a ceiling can be set, and how much work such a setup will take. AWS has published a walkthrough of how to answer these questions with the built-in tools of Amazon Bedrock. For a typical case, you won't have to write your own code.
This is a follow-up to the Jamf story. There, the team built its own control layer: IAM Identity Center, Athena on top of model call logs, and Lambda. It works almost in real time, but the code has to be maintained in-house. The new approach is simpler, but less immediate.
Three steps: attribution, reporting, limiting
First: Bedrock automatically records which IAM user or role made each inference request. You don't need to change your model calls. If every person or application has its own role, tags on the role itself are enough: for example, user, team, CostCenter. If the role is shared, you'll need session tags. They are passed when the role is assumed: via sts:AssumeRole with the --tags parameter, through an OIDC token, or through a SAML assertion. The role's trust policy must allow sts:TagSession. You can define up to 50 tags per user or role.
Second: the tags must be activated as cost allocation tags in the Billing console. In an AWS organization, this is done in the management (payer) account. The tag key appears in the list only after at least one Bedrock call. After that, it takes up to 24 hours for the key to appear and up to another 24 hours for the data to reach billing. Retroactive activation doesn't work, so it's better to enable it in advance.
There are two ways to report. The simple one: Cost Explorer, filtered to Bedrock and grouped by tag. The detailed one: a CUR 2.0 export with the caller identity option, which you query with SQL in Athena. In it, tags live in columns prefixed with iamPrincipal/. An older CUR export won't gain identity data retroactively; you need a new one. AWS has published ready-made queries in the aws-samples/sample-cur-iam-principal-bedrock-tracking repository.
It's easy to make mistakes in the queries. Bedrock bills for four token types: input, output, cache reads, and cache writes. If you count only input and output, the total will be understated, especially for workloads that use prompt caching heavily. The price also depends on the pricing tier and on whether the request went through cross-Region inference. So the rate should be tied to the billing line, not to the model. In addition, Bedrock may be recorded under several product_servicecode values.
Limiting with AWS Budgets
Third: create a Bedrock budget filtered to a specific identity or tag value. A budget action is attached to it, which attaches a Deny IAM policy when the threshold is crossed. You can block only the expensive models while leaving a cheap one available, so the person can keep working. There can be several thresholds. For example, a premium model can be disabled at 80% of the budget, a mid-tier model at 100%, and a cheap model is never disabled. The action can run automatically or after manual approval. Notify the user of the reason, or they will assume the service is broken.
Two roles are needed: your own role, with the managed policy AWSBudgetsActionsWithAWSResourceControlAccess, and a separate role under which Budgets attaches and detaches policies.
Limitations to be aware of
The main limitation: Budgets data is updated up to three times a day, so spending can jump past the threshold before the action fires. For hard real-time control, the Jamf approach remains necessary.
Second: the action is tied to a user, group, or role. A shared role means the restriction will hit everyone who uses it. Through a Bedrock LLM gateway, Bedrock sees only the gateway's service role, not the end user. For federated users without their own role, this method is a poor fit.
Third: CUR contains no line-by-line request data, only aggregates by hour or day. Session tags don't appear in invocation logs, which record the caller's ARN. Distinguishing people within a shared session can be helped by a unique RoleSessionName or request metadata. Finally, when you add a new model, check that it appears in the queries and budget filters, since usage types are tied to models.
The practical takeaway: if every developer or service has its own role, the setup takes a few hours, and for most companies that is enough. If traffic runs through a shared gateway, solve attribution first and only then think about limits.
- Nov 21, 2026AG-UI 1.0 gives AI agents a common language for talking to apps: 31 event types
- Nov 21, 2026OpenAI launches ChatGPT Wallet: agents buy without ever seeing your card number
- Nov 21, 2026US Advertisers Spent $70.7 Million on ChatGPT Ads in October, Up 127% From April
- Nov 21, 2026ONNX Runtime vanishes from GitHub: Microsoft hides repositories after package hack
Key Questions Answered
What are the key details on Three steps: attribution, reporting, limiting?
First: Bedrock automatically records which IAM user or role made each inference request. You don't need to change your model calls. If every person or application has its own role, tags on the role itself are enough: for example, user, team, CostCenter. If the role is shared, you'll need session tags. They are passed when the role is assumed: via sts:AssumeRole with the --tags parameter, through an OIDC token, or through a SAML assertion. The role's trust policy must allow sts:TagSession.
What are the key details on Limiting with AWS Budgets?
Third: create a Bedrock budget filtered to a specific identity or tag value. A budget action is attached to it, which attaches a Deny IAM policy when the threshold is crossed. You can block only the expensive models while leaving a cheap one available, so the person can keep working. There can be several thresholds. For example, a premium model can be disabled at 80% of the budget, a mid-tier model at 100%, and a cheap model is never disabled. The action can run automatically or after manual approval.
What are the key details on Limitations to be aware of?
The main limitation: Budgets data is updated up to three times a day, so spending can jump past the threshold before the action fires. For hard real-time control, the Jamf approach remains necessary. Second: the action is tied to a user, group, or role. A shared role means the restriction will hit everyone who uses it. Through a Bedrock LLM gateway, Bedrock sees only the gateway's service role, not the end user. For federated users without their own role, this method is a poor fit.
Test Frontier LLMs & Autonomous Agents in One Workspace
Run Claude Opus 5.5, GPT-6, Gemini 3.1, and DeepSeek side-by-side in Nomad AI (nomadnet.ai) — unified model routing, deep research, and multimodal workflows under one subscription.
The AI world, distilled — once a week
Seven stories that actually mattered, hand-picked. No noise, no reposts, no press releases.
Done! Check your inbox for a confirmation.