Bedrock per-tenant cost attribution: inference profiles vs STS sessions vs requestMetadata
rahulladumor · reddit · 2026-10-20
A hands-on breakdown of attributing Bedrock spend per tenant when a gateway calls through a single IAM role. Three options answer different questions: (1) tagged inference profiles flow to Cost Explorer/CUR but each profile binds one model, so combinations multiply; (2) per-tenant STS session names appear in both invocation logs and CUR 2.0's lineitemiamprincipal, enabling daily per-tenant reconciliation; (3) requestMetadata gives per-request token counts priced with your own rate card — an estimate written to logs, not the bill. Billing data lands up to 24h late, tags aren't retroactive, and nothing stops spend: budgets and rate limits must live in the gateway's request path. CloudWatch token metrics only offer model-level dimensions.
More from coding & agent
- Supabase monitoring tool drops table limit — free plan now watches unlimited tables — santiviquez · 2026-10-20
- Dev's disk-saving trick: purge old git worktrees to reclaim 70% of disk space — intellectronica · 2026-10-20
- Claude Code ships a --tmux flag for built-in terminal pane layouts — wateriscoding · 2026-10-20
- DeepLearning.AI launches free Context Engineering course with Chroma to fight Context Rot — DeepLearningAI · 2026-10-20
- Dev who shipped 100+ apps lays out step-by-step path to building your first AI app — PrajwalTomar_ · 2026-10-20
- Nobody Reads Code Anymore — So What Language Should Your Agent Write In? — fhinkel · 2026-10-20