# Amazon Bedrock Cost per Developer: IAM Identity Center for Claude Code and Codex

> Source: <https://explainx.ai/blog/amazon-bedrock-ai-coding-tools-per-user-cost-iam-identity-center-2026?utm_source=rss&utm_medium=feed&utm_campaign=blog>
> Published: 2026-11-13 00:00:00+00:00

**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](https://aws.amazon.com/blogs/machine-learning/cost-attribution-and-controls-for-ai-developer-and-productivity-tools-on-amazon-bedrock/?ref=explainx). 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](https://explainx.ai/blog/track-and-cap-amazon-bedrock-spend-per-iam-principal-cur-2-0-aws-budgets-deny-policy-guide-2026)** 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](https://explainx.ai/blog/openai-codex-amazon-bedrock-sso-agentcore-gateway-setup-guide-2026) and the newer **[AgentCore runtime generation](https://explainx.ai/blog/aws-bedrock-agentcore-runtime-next-generation-november-2026)**. 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](https://explainx.ai/blog/aws-bedrock-four-inference-choices-cost-cache-flex-guide-2026)** and **[per-task ROI baselines](https://explainx.ai/blog/aws-bedrock-cost-per-task-not-per-token-agent-roi-baselines-holdouts-part-2-2026)**.

## 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 bedrock`
- `inferenceBedrockSsoStartUrl` plus 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:

1. Enable **“Include caller identity (IAM principal) allocation data”** when creating CUR 2.0; older exports lack the column.
2. Activate **cost allocation tags** only after each principal has invoked Bedrock once; wait up to**48 hours** for billing visibility.
3. 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](https://explainx.ai/blog/self-service-llm-gateway-amazon-bedrock-litellm-fargate-inference-profiles-virtual-keys-guide-2026)** 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](https://explainx.ai/blog/aws-agent-dlc-production-engineering-agents-2026)** 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:

1. **Inventory tools** — survey which teams already installed Claude Code, Codex, or OpenCode and whether they use shared access keys.
2. **Stand up Identity Center permission sets** — one for`bedrock-runtime` , one for`bedrock-mantle` , or a combined set with tightly scoped ARNs.
3. **Pilot a single business unit** — ten developers on SSO, one CUR export with principal column enabled, daily Athena job emailed to FinOps.
4. **Activate cost allocation tags** — map`Team` and`CostCenter` from Entra or Okta; wait the full 48-hour billing propagation AWS documents.
5. **Publish internal docs** — copy the`~/.aws/config` snippet and Claude`settings.json` template; forbid long-lived access keys in security guidelines.
6. **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](https://explainx.ai/blog/track-and-cap-amazon-bedrock-spend-per-iam-principal-cur-2-0-aws-budgets-deny-policy-guide-2026) 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](https://explainx.ai/blog/aws-bedrock-agentcore-runtime-next-generation-november-2026) 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** (`runtime` plus`mantle` ); 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](https://explainx.ai/blog/aws-bedrock-kb-acl-agentcore-gateway-interceptor-2026)** when agents read documents while coding. Log which principal requested which retrieval alongside codegen calls for exfiltration investigations.

## Related reading on explainx.ai

Official: [AWS cost attribution for AI developer tools](https://aws.amazon.com/blogs/machine-learning/cost-attribution-and-controls-for-ai-developer-and-productivity-tools-on-amazon-bedrock/?ref=explainx). Background docs: [What is IAM Identity Center?](https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html?ref=explainx) and [AWS Data Exports](https://docs.aws.amazon.com/cur/latest/userguide/cur-data-exports.html?ref=explainx), the service that delivers CUR 2.0.

*Tool names, IAM actions, and configuration keys follow AWS’s November 13, 2026 post.*
