AWS•How-to••by Steph Gooch•AWS Artificial Intelligence Blog
Running Amazon Bedrock across many accounts shows you the bill but not what happened inside each call. This post builds a centralized observability data lake that aggregates Bedrock invocation logs from every linked account into one queryable table, so you can see prompts, token counts, model choice, and per-invocation cost across your organization.
A CloudWatch, Firehose, Lambda and Athena pipeline gathers Bedrock invocation logs from linked accounts into one queryable table with prompts, tokens, models and IAM identity.
Who it is for
Platform and ML engineers running Amazon Bedrock across several AWS accounts who need per-call visibility and cost attribution.
Key points
Deployed with two CloudFormation templates; the central stack must be deployed first.
Bedrock invocation logging must be turned on separately in each source account, since it is not a CloudFormation resource.
Dollar cost is obtained by joining the processed table to CUR 2.0 data on the IAM ARN.
Prompts may contain PII, so the post recommends reviewing IAM and S3 bucket policies.
AI:Bedrock records the caller's IAM principal on each inference, so spend can be tagged, reported with CUR 2.0 or Cost Explorer, and capped with AWS Budgets actions that attach a Deny policy.
AI:Bedrock spend is tracked per engineer in Athena, and an IAM policy loop denies premium Claude models at 80% and 100% of a daily budget while leaving Haiku open.
AI:Bedrock records the IAM principal behind each inference call, so per-user spend can be traced in CUR 2.0 using IAM Identity Center session tags and Athena queries.