Pillar: Visibility & Attribution Series: Tokenomics Tuesdays
Why is this important?
You opened your AWS bill this month and there's a new line item that's bigger than you expected. Amazon Bedrock. But what does that number actually mean? Which models are costing the most? How much of that is input tokens versus output? Are your teams using caching or paying full price for every request?
The AWS Cost and Usage Report 2.0 (CUR 2.0) now contains line-item detail for every Bedrock inference request, broken down by token type, model, and even the IAM principal who made the call. It's the most granular cost data AWS provides, and it's sitting in your S3 bucket right now.
The problem is most people aren't looking at it. They're checking Cost Explorer, seeing a Bedrock total, and moving on. That total tells you nothing about where to optimise. CUR 2.0 does.
What resources are relevant?
- AWS CUR 2.0 via AWS Data Exports in the Billing console
- Amazon Athena for querying CUR data
- Amazon S3 where your CUR data lands
How to implement
Step 1: Enable CUR 2.0 if you haven't already
Navigate to the AWS Billing console > Data Exports and create a new Cost and Usage Report export. Select CUR 2.0 format. Choose an S3 bucket for the output and enable Parquet format for efficient Athena queries.
If you're still on the legacy CUR, now is the time to switch. CUR 2.0 is required for IAM Principal cost allocation and provides cleaner, more structured columns for Bedrock data. The sooner you do this, the sooner you start collecting data, so even if you're not ready to analyse yet, turn it on.
Step 2: Understand the Bedrock line items
Each Bedrock inference request generates separate CUR line items for each token type. Here's what to look for:
Column | What it tells you |
|---|
line_item_product_code | Filter for AmazonBedrock |
line_item_usage_type | Shows the model and token type (e.g., USEast1-Anthropic-Claude-4-Sonnet-InputTokens) |
line_item_unblended_cost | Cost for that line item |
line_item_iam_principal | Who made the call (requires IAM Principal allocation enabled) |
resource_tags_* | Your custom cost allocation tags |
The usage type string encodes three things: the region, the model, and the token direction (input, output, or cached). This is your key to understanding cost per model.
Step 3: Enable IAM Principal cost allocation
In the Billing console, navigate to Cost Allocation Tags and enable the IAM Principal columns. Within 24 hours, every Bedrock API call will have the caller's IAM ARN attached in CUR. If your users assume IAM Roles with session names (common in enterprise setups), the session name appears too, giving you per-user data.
Step 4: Query with Athena
Set up a Glue table on your CUR S3 bucket and start querying. Here's the first query every team should run.
Top spenders by IAM principal:
SELECT
line_item_iam_principal,
SUM(line_item_unblended_cost) AS total_cost,
SUM(line_item_usage_amount) AS total_tokens
FROM cur_2_0
WHERE line_item_product_code = 'AmazonBedrock'
AND line_item_usage_start_date >= DATE_ADD('day', -30, CURRENT_DATE)
AND line_item_iam_principal IS NOT NULL
GROUP BY 1
ORDER BY total_cost DESC
LIMIT 20
Step 5: Spot the red flags
Once you can see the data, look for these patterns:
- Zero cached tokens: if your Claude Code users have no cache hits, they're paying full price for every request. Caching should be on by default, but old versions or misconfigured setups miss it.
- 100% Opus usage: users defaulting to the most expensive model for every task. Best practice is to blend, using Opus for planning and Sonnet for day-to-day work.
- Single-user spikes: one person spending thousands per day usually means a runaway process, not productive work.
- Off-hours usage: high spend at 3am from a single user often indicates an unattended agent loop.
Summary
Your CUR 2.0 data already contains everything you need to understand your GenAI spend. Enable it, turn on IAM Principal allocation, and run a few Athena queries. You'll go from "Bedrock costs $X" to knowing exactly which models, which users, and which token types are driving that number. That's the foundation for every optimisation decision that comes next.
Tokenomics Tuesdays is a weekly series exploring the economics of AI tokens on AWS Builder Centre . Follow for more on
Loading article