AI Cloud Architect

Amazon Bedrock tokenomics data lake

AWSHow-to by Steph GoochAWS 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.

Read the original (opens the source's page in a new tab)

AI: Summary

What it is

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.