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
  • Why this post exists now
  • Step 0: pick the right endpoint
  • Identity Center wiring (compressed walkthrough)
  • CUR 2.0: turn on principal columns
  • Enforcement ladder
  • What people are asking on HN and in tickets
  • Rollout playbook for platform teams
  • Athena patterns beyond the sample query
  • Mantle Projects versus runtime profiles
  • Troubleshooting misattributed spend
  • Why AWS published two posts back-to-back
  • Mapping tools to corporate identity systems
  • FinOps talking points for leadership slides
  • Security review notes
  • Related reading on explainx.ai
← Back to blog

explainx / blog

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

AWS, Amazon Bedrock, Claude Code, FinOps, IAM

Part of Microsoft, Apple and Amazon AI

AWS Nov 13 post shows per-user Bedrock attribution for Claude Code, Codex, ChatGPT Work and OpenCode via IAM Identity Center, CUR 2.0, and optional budget caps.

Nov 13, 2026·9 min read·Yash Thakker
add explainx.ai
go deep
Amazon Bedrock Cost per Developer: IAM Identity Center for Claude Code and Codex

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

table · 2 cols
QuestionAnswer per AWS Nov 13 post
Attribution mechanismline_item_iam_principal in CUR 2.0
Best identity patternIAM Identity Center with unique session names
Claude pathbedrock-runtime InvokeModel
Codex / ChatGPT Work pathbedrock-mantle CreateInference on Projects
Tool configSSO in Claude Desktop MDM plist; AWS_PROFILE for Codex
Common mistakeAWS_BEARER_TOKEN_BEDROCK forces API-key principal
EnforcementBudgets deny (slow) vs CloudWatch Lambda vs gateway proxy
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.

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

table · 3 cols
Tool (per AWS)EndpointRepresentative actions
Claude Code / Claude Desktopbedrock-runtimebedrock:InvokeModel, streaming variants
Codex / ChatGPT Workbedrock-mantlebedrock-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 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:

table · 3 cols
ApproachLatencyComplexity
AWS Budgets deny on tagUp to ~1 day lagLow
CloudWatch metrics + LambdaMinutesMedium
DynamoDB quota at credential refreshNext SSO refreshMedium-high
Multi-provider LLM gatewayPer requestHighest

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:

  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 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

table · 3 cols
Symptom in CURLikely causeFix
All spend under one assumed-role/bedrock-shared/...Shared role, identical session namesIdentity Center per user
Spike under IAMUser/bedrock-api-keyAWS_BEARER_TOKEN_BEDROCK set globallyUnset token; enforce SSO
Missing principal columnOld CUR exportCreate new export with caller identity
Tags inactiveNo Bedrock call yet from principalHave each user invoke once, wait 48h
Costs lag capsBudgets plus billing delayAdd gateway or DynamoDB quota layer

Weekly budget cap illustration for Amazon Bedrock FinOps per developerWeekly 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

table · 3 cols
Identity patternWhat CUR showsWhen to use
One shared bedrock-ci roleSingle principal line itemSandboxes only
Per-app IAM rolesRole ARN, not humanServices and AgentCore
Identity Center per engineerDistinct session nameClaude Code, Codex, desktop agents
IAM user plus static keyAPI userBreak-glass automation, breaks attribution
LLM gateway roleGateway principalCentral 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 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.

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

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

On November 12, 2026 AWS published a walkthrough for tracking and capping Amazon Bedrock spend per IAM principal using only AWS-native features. Bedrock records who made each call, you activate the tags, read cost in Cost Explorer or a CUR 2.0 export, and an AWS Budgets action attaches a Deny policy at the threshold. This guide covers the steps, the delays that catch teams out, and the token-counting mistake to avoid.

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.