1. News
  2. AI models & agents
  3. AWS · AI costs
AWS · AI costs3 min read

AWS shows how to see inside every AI call your company makes

AWS published a free setup that gathers every AI request from all your accounts into one searchable table, so you can see which prompts and teams drive the bill.

By the Dashline deskSource: AWS Machine Learning blog
AWS shows how to see inside every AI call your company makes
Photo: Derrick Coetzee from Berkeley, CA, USA, CC0

Amazon Web Services has published a way to look inside every AI request your company makes through Amazon Bedrock, its service for running AI models. Until now, a company with many AWS accounts could see the total bill but not what happened inside each call. The new design collects those records into one place.

What changed

Bedrock can already keep a log of each request, including the prompt, the answer, the model used and how many tokens were consumed. A token is a small chunk of text that AI services use to measure and charge for work. The catch is that these logs stay locked inside each separate account.

The AWS post describes a central data lake that pulls them together. Every request from every linked account lands in one table that can be searched with ordinary SQL, a common language for asking questions of data.

How it works

Each account forwards its Bedrock logs to a central account. A small piece of code unwraps the compressed records. They are then stored in a file format built for fast searching and exposed through Amazon Athena, a query tool. The whole setup is deployed with two templates, so it can be repeated across accounts.

Once running, the table can show which users burn the most tokens, which models get picked most, and what people are actually asking. It can also be tied to the AWS Cost and Usage Report to see spending by day. The post also shows how to work out the cost of each individual call.

Who it affects

The post is written for platform and machine learning engineers who look after AI projects across several teams. The payoff reaches further. Without this view, a sudden jump in cost is hard to explain, wasteful prompts are hard to spot, and one team's usage is hard to tell from another's.

What to do

The templates, code and queries are free in an AWS GitHub repository called AWS Sample Bedrock Invocation Data Lake. A few steps matter if a team tries it:

  • Deploy the central account setup first, then the small setup in each linked account.
  • Switch on Bedrock logging in every account. The templates do not do this for you.
  • Send a test request and wait about a minute for data to appear.
  • Run the saved Athena query once to create the flattened view.

Because the logs include prompt and response text, the central bucket will hold that content. Who can read it is worth deciding before rollout.

What is not covered

The material does not say what the setup itself costs to run, and it is a sample project rather than a finished product. Teams that do not use AWS will not benefit directly.

The takeaway

If your company runs AI on AWS across several accounts, this free sample shows how to see each request and who is driving the cost.

More articles

You should really read these.

Next step

Let’s talk