FinOps teams finally get a native answer for a question Claude Code pilots ask weekly: who spent what on Bedrock? On November 13, 2026 AWS published cost attribution and controls for AI developer and productivity tools on Amazon Bedrock. The post shows how IAM Identity Center, SSO login profiles, and CUR 2.0 attribute inference from Claude Code, Claude Desktop, OpenAI Codex, ChatGPT Work, and OpenCode without a custom Lambda metering loop.
We covered the adjacent native CUR 2.0 plus Budgets deny guide on November 12. Today’s article focuses on federated developers, bedrock-mantle versus bedrock-runtime, and the configuration footguns that collapse everyone into one billable principal.
TL;DR
| Question | Answer per AWS Nov 13 post |
|---|---|
| Attribution mechanism | line_item_iam_principal in CUR 2.0 |
| Best identity pattern | IAM Identity Center with unique session names |
| Claude path | bedrock-runtime InvokeModel |
| Codex / ChatGPT Work path | bedrock-mantle CreateInference on Projects |
| Tool config | SSO in Claude Desktop MDM plist; AWS_PROFILE for Codex |
| Common mistake | AWS_BEARER_TOKEN_BEDROCK forces API-key principal |
| Enforcement | Budgets deny (slow) vs CloudWatch Lambda vs gateway proxy |
Why this post exists now
Enterprises rolled out Claude Code on Bedrock using our SSO plus AgentCore gateway setup and the newer AgentCore runtime generation. Leadership’s next question is never “can we enable it?”—it is “which team blew the budget?”
AWS argues Bedrock attributes spend at the endpoint layer, under tool-specific logic. That means one Identity Center permission set can cover multiple vendor CLIs as long as each authenticates as the human, not a shared service key.
Anthropic-hosted Claude Enterprise and Claude Platform on AWS remain separate: AWS explicitly says those paths surface usage in Anthropic admin tools, not this CUR principal column. Route tools to Bedrock directly if you want AWS-native dollars.
Step 0: pick the right endpoint
| Tool (per AWS) | Endpoint | Representative actions |
|---|---|---|
| Claude Code / Claude Desktop | bedrock-runtime | bedrock:InvokeModel, streaming variants |
| Codex / ChatGPT Work | bedrock-mantle | bedrock-mantle:CreateInference, token count |
Your permission set must include both if you standardize one SSO role for mixed teams. AWS sample JSON scopes mantle calls to a Project ARN and runtime calls to approved inference profiles.
For architecture background, see four inference choices on Bedrock and per-task ROI baselines.
Identity Center wiring (compressed walkthrough)
1. Federate IdP with SCIM. Map department attributes to session tags such as Team and CostCenter so CUR shows iamPrincipal/Team dimensions.
2. Create a Bedrock permission set assigned to developer groups. Narrow model and Project ARNs to approved inventory.
3. Ship a standard ~/.aws/config profile using aws sso login --profile bedrock. AWS emphasizes no credential helper scripts—CLI refresh handles tokens until the eight-hour default session ends.
4. Configure each AI tool once.
Claude Desktop enterprise admins export MDM profiles with:
inferenceProvider bedrockinferenceBedrockSsoStartUrlplus account and role names- Optional pinned model list such as Sonnet and Opus inference profile IDs
Claude Code reads the AWS SDK chain. Set CLAUDE_CODE_USE_BEDROCK=1, AWS_PROFILE=bedrock, and optionally awsAuthRefresh in settings.json so expired SSO sessions re-login automatically. Unset AWS_BEARER_TOKEN_BEDROCK when you want per-user SSO attribution.
Codex and ChatGPT Work share ~/.codex/config.toml with either model_provider = "amazon-bedrock" (mantle) or amazon-bedrock-runtime (inference profiles). Place AWS_PROFILE in ~/.codex/.env for GUI apps that do not inherit shell exports.
CUR 2.0: turn on principal columns
AWS repeats three FinOps rules also stressed in yesterday’s guide:
- Enable “Include caller identity (IAM principal) allocation data” when creating CUR 2.0; older exports lack the column.
- Activate cost allocation tags only after each principal has invoked Bedrock once; wait up to 48 hours for billing visibility.
- Sum input, output, cache read, and cache write token lines—missing cache rows undercounts Claude Code sessions with prompt caching.
Example Athena grouping from the post extracts user_name via regex on line_item_iam_principal and filters AmazonBedrock product codes.
Enforcement ladder
AWS lists four layers:
| Approach | Latency | Complexity |
|---|---|---|
| AWS Budgets deny on tag | Up to ~1 day lag | Low |
| CloudWatch metrics + Lambda | Minutes | Medium |
| DynamoDB quota at credential refresh | Next SSO refresh | Medium-high |
| Multi-provider LLM gateway | Per request | Highest |
Most enterprises will report in CUR first, add Budgets backstops, then graduate to gateways only if compliance demands per-call blocking. Compare with LiteLLM self-service gateway on Fargate if you need virtual keys atop the same Bedrock routes.
What people are asking on HN and in tickets
“Can we still use a single Bedrock API key for speed?” Yes, but CUR will attribute everything to that key’s IAM user. AWS calls this out for both Claude Code and Codex.
“Does AgentCore change attribution?” AgentCore runtime adds orchestration; Bedrock still sees the principal that signed the inference call. Pair with AgentCore production engineering agents DLC when you move from CLI pilots to services.
“How does this interact with Claude Max seats?” Seat billing stays with Anthropic; this guide is for Bedrock-metered tokens only.
Rollout playbook for platform teams
Week zero is identity, not models. Platform engineers should sequence work this way:
- Inventory tools — survey which teams already installed Claude Code, Codex, or OpenCode and whether they use shared access keys.
- Stand up Identity Center permission sets — one for
bedrock-runtime, one forbedrock-mantle, or a combined set with tightly scoped ARNs. - Pilot a single business unit — ten developers on SSO, one CUR export with principal column enabled, daily Athena job emailed to FinOps.
- Activate cost allocation tags — map
TeamandCostCenterfrom Entra or Okta; wait the full 48-hour billing propagation AWS documents. - Publish internal docs — copy the
~/.aws/configsnippet and Claudesettings.jsontemplate; forbid long-lived access keys in security guidelines. - Add Budgets deny as backstop — per-team monthly thresholds after you trust CUR accuracy for two billing cycles.
Skipping step three is how organizations discover, three months later, that a single bedrock-prod role spent six figures. The November 13 post exists because that failure mode is now common enough to warrant first-class documentation.
Athena patterns beyond the sample query
AWS’s post includes a per-user cost roll-up and a daily spend trend by cost center. Extend those queries in three directions FinOps actually needs:
Per model and principal. Group on line_item_usage_type and line_item_operation to see whether Codex mantle calls dominate versus Claude streaming invocations. That split informs whether you need separate Projects per team on mantle.
Cache token lines. Filter usage types containing Cache in the name. Teams enabling prompt caching in Claude Code can look efficient on input tokens while cache-write rows explode. Our November 12 guide stressed this mistake; the November 13 developer focus repeats it because coding agents trigger caching often.
Anomaly detection. Join CUR to QuickSight or Grafana with week-over-week percent change per user_name. Identity Center makes person-level spikes visible—useful when someone loops an agent on a refactor.
Mantle Projects versus runtime profiles
Codex and ChatGPT Work on bedrock-mantle need a Project resource in IAM policies. Claude tools on bedrock-runtime need inference profile or foundation model ARNs. Mixed shops should not assume one permission set fits all tools without reading both statement blocks in AWS’s JSON.
If you already deployed AgentCore runtime for server agents, keep human CLI attribution separate: service roles for agents should use distinct tags like Workload=agent-service so CUR does not attribute bot spend to individual engineers.
Troubleshooting misattributed spend
| Symptom in CUR | Likely cause | Fix |
|---|---|---|
All spend under one assumed-role/bedrock-shared/... | Shared role, identical session names | Identity Center per user |
Spike under IAMUser/bedrock-api-key | AWS_BEARER_TOKEN_BEDROCK set globally | Unset token; enforce SSO |
| Missing principal column | Old CUR export | Create new export with caller identity |
| Tags inactive | No Bedrock call yet from principal | Have each user invoke once, wait 48h |
| Costs lag caps | Budgets plus billing delay | Add gateway or DynamoDB quota layer |
Weekly budget cap illustration for Amazon Bedrock FinOps per developer
Why AWS published two posts back-to-back
The November 12 tokenomics article targeted FinOps leaders who want Budgets denies without Lambda. The November 13 article targets developer platform owners rolling out coding agents. Together they describe one platform feature—principal attribution—with different enforcement menus. If your organization only read the first post, you might miss AWS_BEARER_TOKEN_BEDROCK guidance that determines whether Claude Code shows up as individuals or as one API user.
Mapping tools to corporate identity systems
| Identity pattern | What CUR shows | When to use |
|---|---|---|
One shared bedrock-ci role | Single principal line item | Sandboxes only |
| Per-app IAM roles | Role ARN, not human | Services and AgentCore |
| Identity Center per engineer | Distinct session name | Claude Code, Codex, desktop agents |
| IAM user plus static key | API user | Break-glass automation, breaks attribution |
| LLM gateway role | Gateway principal | Central policy, hides humans unless tagged |
Enterprises standardizing on Entra ID or Okta should treat Bedrock like any other AWS SSO workload: the permission set becomes the contract between corp IT and AI platform teams. Document which inference profiles each business unit may invoke so denial policies do not block legal models when only spend thresholds trip.
FinOps talking points for leadership slides
Use these sentences when presenting the November 13 guidance upstairs:
- Bedrock already knows who called, but Finance only sees it after CUR principal export and tag activation.
- Coding agents are multi-endpoint (
runtimeplusmantle); cost models must include both product lines. - Enforcement choices are latency trades, not moral ones—Budgets is cheap but slow; gateways cost ops time but block within minutes.
- Anthropic-hosted Claude seats are orthogonal; do not merge those invoices with Bedrock CUR without double-counting.
Security review notes
SSO attribution reduces shared-credential risk: revoking one user does not require rotating a team API key. Pair Identity Center with Bedrock KB ACL interceptors when agents read documents while coding. Log which principal requested which retrieval alongside codegen calls for exfiltration investigations.
Related reading on explainx.ai
- Track and cap Bedrock per IAM principal (Nov 12)
- Codex on Bedrock SSO setup
- Bedrock AgentCore runtime
- Four inference choices and cache flex
- Cost per task, not per token
- SGLang on Trainium DLC
Official: AWS cost attribution for AI developer tools. Background docs: What is IAM Identity Center? and AWS Data Exports, the service that delivers CUR 2.0.
Tool names, IAM actions, and configuration keys follow AWS’s November 13, 2026 post.
