/

/

Bedrock cost by team: the native AWS methods, and an Athena query to adapt

Bedrock cost by team: the native AWS methods, and an Athena query to adapt

AI cost

Bedrock cost by team: the native AWS methods, and an Athena query to adapt

Split Amazon Bedrock spend by team with inference profile tags, IAM principal data in CUR 2.0, Cost Explorer and an Athena query. Then where Costory fits.

·

Grégoire Blond

·

9 min read

TL;DR: Bedrock has no single "team" field on the bill. You get one by tagging application inference profiles, by tagging the IAM roles that call Bedrock and turning on caller identity data in CUR 2.0, or by putting request metadata in invocation logs and joining it back to the bill. Below is how each method works, a CUR 2.0 query for Athena that splits Bedrock spend by team and model, and the traps (Claude bills under AWS Marketplace). You are right to build this yourself. The last section covers what Costory does when you would rather not maintain it.

Why Bedrock cost by team is harder than it looks

Most AWS costs follow a resource. You tag the resource, activate the tag, and the tag lands on the bill.

An InvokeModel or Converse call has no resource of its own. Unless you route it through something taggable, Bedrock spend shows up per model and per usage type, not per team.

There is a second trap. Anthropic's models on Bedrock, and some other third-party models, are sold by the model provider and show up as an AWS Marketplace bill. In Cost Explorer each one appears as its own service, named like "Claude ... (Amazon Bedrock Edition)". A report filtered on the Amazon Bedrock service alone misses them. See the Amazon Bedrock FAQ and the CUR query library.

Four native ways to attribute Bedrock spend

Method

What carries the team

Lands on the bill (CUR, Cost Explorer)

Main limit

Application inference profiles

A cost allocation tag on the profile

Yes, as a resource tag

Every caller has to invoke the profile ARN, not the model ID

IAM principal data

The calling IAM user or role, and its tags

Yes, in CUR 2.0 (line_item_iam_principal) and as iamPrincipal/ tags

A shared gateway role puts every team behind one identity

Request metadata

Key-value pairs you send with each call

No, only in model invocation logs

You join logs to the bill yourself

CloudWatch runtime metrics

Model ID only

No

Token counts, not cost, and no team

You can combine them. AWS describes request metadata, IAM principal attribution and application inference profiles as working side by side on the same workload (AWS docs).

1. Application inference profiles and cost allocation tags

An application inference profile is a Bedrock resource you create to track cost and usage for one model, in one Region or across the Regions of a cross-Region profile. You attach tags when you create it with CreateInferenceProfile (required fields: inferenceProfileName and modelSource; tags is optional) (AWS docs).

aws bedrock create-inference-profile \
  --inference-profile-name search-team-claude \
  --model-source copyFrom=<foundation model or cross-Region profile ARN> \
  --tags key=team,value

aws bedrock create-inference-profile \
  --inference-profile-name search-team-claude \
  --model-source copyFrom=<foundation model or cross-Region profile ARN> \
  --tags key=team,value

aws bedrock create-inference-profile \
  --inference-profile-name search-team-claude \
  --model-source copyFrom=<foundation model or cross-Region profile ARN> \
  --tags key=team,value

Then each team calls Bedrock with its own profile ARN as the model ID. Activate the team key as a cost allocation tag in the Billing console. From then on, Bedrock lines carry it as a resource tag in CUR and in Cost Explorer (AWS docs).

The catch: it only works for calls that use the profile. Calls made with a raw model ID or a system-defined cross-Region profile stay untagged. Activation is not retroactive either.

AWS also lists Bedrock projects and workspaces as carriers of cost allocation tags (AWS, 8 Oct 2026).

2. IAM principal data in CUR 2.0

Since April 2026, AWS can record the caller of every Bedrock inference call in CUR 2.0 (AWS blog, 17 Apr 2026). Three steps:

  1. Tag the IAM users and roles that call Bedrock, for example team=search.

  2. Activate those tags as cost allocation tags in the Billing console. They only show up for activation after the principal has made at least one call.

  3. Create a CUR 2.0 export with "Include caller identity (IAM principal) allocation data". In the export definition this is the INCLUDE_IAM_PRINCIPAL_DATA table configuration.

You then get a line_item_iam_principal column with the caller's ARN, and the principal's activated tags with an iamPrincipal/ prefix, for example iamPrincipal/team (CUR 2.0 table dictionary). Data starts on 8 April 2026. It must be activated from the management account. Expect more CUR rows, one per principal.

The limit is the gateway. If calls go through one shared proxy role, they all land on that role. AWS suggests one role per consumer group, or session tags passed on AssumeRole, which override the role's tags for that session.

3. Request metadata in model invocation logs

For finer cuts (feature, customer, experiment), Bedrock accepts up to 16 key-value pairs per call: the requestMetadata field on Converse and ConverseStream, or the X-Amzn-Bedrock-Request-Metadata header on InvokeModel and InvokeModelWithResponseStream (AWS docs).

import boto3

client = boto3.client("bedrock-runtime")
response = client.converse(
    modelId="<model ID or application inference profile ARN>",
    messages=[{"role": "user", "content": [{"text": "Summarize this ticket."}]}],
    requestMetadata={"team": "growth", "feature": "summarizer", "environment": "prod"},
)
import boto3

client = boto3.client("bedrock-runtime")
response = client.converse(
    modelId="<model ID or application inference profile ARN>",
    messages=[{"role": "user", "content": [{"text": "Summarize this ticket."}]}],
    requestMetadata={"team": "growth", "feature": "summarizer", "environment": "prod"},
)
import boto3

client = boto3.client("bedrock-runtime")
response = client.converse(
    modelId="<model ID or application inference profile ARN>",
    messages=[{"role": "user", "content": [{"text": "Summarize this ticket."}]}],
    requestMetadata={"team": "growth", "feature": "summarizer", "environment": "prod"},
)

Two things to know. The metadata is only kept when model invocation logging is on in that Region. And it never reaches the bill: it lands in the logs next to the token counts, not in CUR or Cost Explorer.

So you have two options. Multiply logged tokens by your own rate card, which is quick but an estimate (no discounts, batch or provisioned throughput unless you model them). Or join the logs back to CUR. AWS notes that CUR has no per-request ID: it aggregates cost by usage type over an hour or a day. The join therefore happens at the model, day and usage type grain, with the logs giving the split underneath.

4. CloudWatch invocation metrics

Bedrock publishes Invocations, InputTokenCount, OutputTokenCount, CacheReadInputTokenCount and CacheWriteInputTokenCount in the AWS/Bedrock namespace, with and without a ModelId dimension (AWS docs).

They are good for alarms and trend lines on token volume. They carry no cost and no team, so on their own they do not answer the question.

Cost Explorer: model and team in two clicks

Since 8 October 2026, Cost Explorer, Budgets and Cost Management dashboards can group Bedrock cost by product attributes: provider, model, inferenceType and feature. The data starts on 1 September 2026, and it covers the Marketplace-billed models too, across their separate service names (AWS, 8 Oct 2026, API reference).

aws ce get-cost-and-usage \
  --time-period Start=2026-11-01,End=2026-11-26 \
  --granularity MONTHLY \
  --metrics UnblendedCost \
  --group-by Type=PRODUCT_ATTRIBUTE,Key=model Type=TAG,Key

aws ce get-cost-and-usage \
  --time-period Start=2026-11-01,End=2026-11-26 \
  --granularity MONTHLY \
  --metrics UnblendedCost \
  --group-by Type=PRODUCT_ATTRIBUTE,Key=model Type=TAG,Key

aws ce get-cost-and-usage \
  --time-period Start=2026-11-01,End=2026-11-26 \
  --granularity MONTHLY \
  --metrics UnblendedCost \
  --group-by Type=PRODUCT_ATTRIBUTE,Key=model Type=TAG,Key

Combine the product attribute with your inference profile tag (as above) or with an iamPrincipal/ tag. The AWS API docs do not spell out the exact tag key Cost Explorer expects for IAM principal tags: treat iamPrincipal/team as an example to adapt, and check the key in your own account.

An Athena query: Bedrock cost by team and model on CUR 2.0

This query reads a CUR 2.0 export in Athena. It takes the team from the inference profile tag first, then from the IAM principal tag, then falls back to the role name in the caller ARN. Anything left is unallocated, which is worth watching: it is your untagged traffic.

First, list the tag keys you actually have. CUR 2.0 normalizes resource tag keys (a user tag team becomes user_team in resource_tags), while the tags column keeps the raw keys.

SELECT DISTINCT key
FROM cur2
CROSS JOIN UNNEST(map_keys(resource_tags)) AS t(key)

SELECT DISTINCT key
FROM cur2
CROSS JOIN UNNEST(map_keys(resource_tags)) AS t(key)

SELECT DISTINCT key
FROM cur2
CROSS JOIN UNNEST(map_keys(resource_tags)) AS t(key)

Then the split:

-- Bedrock cost by team and model, CUR 2.0 in Athena.
-- Replace cur2 with your table and adjust the tag keys to the ones listed above.
SELECT
  date_trunc('day', line_item_usage_start_date)              AS usage_day,
  COALESCE(
    resource_tags['user_team'],                               -- tag on an application inference profile
    tags['iamPrincipal/team'],                                -- tag on the calling IAM role or user
    regexp_extract(line_item_iam_principal, 'assumed-role/([^/]+)', 1),  -- role name as a last resort
    'unallocated'
  )                                                           AS team,
  product['provider']                                         AS model_provider,
  product['model']                                            AS model,
  product['inference_type']                                   AS inference_type,
  bill_billing_entity                                         AS billing_entity,  -- AWS or AWS Marketplace
  SUM(line_item_usage_amount)                                 AS usage_amount,
  SUM(line_item_unblended_cost)                               AS unblended_cost
FROM cur2
WHERE bill_billing_period_start_date = TIMESTAMP '2026-11-01 00:00:00'
  AND (
    product_product_family = 'Amazon Bedrock'
    OR product['product_name'] LIKE '%(Amazon Bedrock Edition)%'  -- Claude and other Marketplace-billed models
  )
  AND line_item_line_item_type = 'Usage'                      -- leaves out tax, credits and refunds
GROUP BY 1, 2, 3, 4, 5, 6
ORDER BY unblended_cost DESC

-- Bedrock cost by team and model, CUR 2.0 in Athena.
-- Replace cur2 with your table and adjust the tag keys to the ones listed above.
SELECT
  date_trunc('day', line_item_usage_start_date)              AS usage_day,
  COALESCE(
    resource_tags['user_team'],                               -- tag on an application inference profile
    tags['iamPrincipal/team'],                                -- tag on the calling IAM role or user
    regexp_extract(line_item_iam_principal, 'assumed-role/([^/]+)', 1),  -- role name as a last resort
    'unallocated'
  )                                                           AS team,
  product['provider']                                         AS model_provider,
  product['model']                                            AS model,
  product['inference_type']                                   AS inference_type,
  bill_billing_entity                                         AS billing_entity,  -- AWS or AWS Marketplace
  SUM(line_item_usage_amount)                                 AS usage_amount,
  SUM(line_item_unblended_cost)                               AS unblended_cost
FROM cur2
WHERE bill_billing_period_start_date = TIMESTAMP '2026-11-01 00:00:00'
  AND (
    product_product_family = 'Amazon Bedrock'
    OR product['product_name'] LIKE '%(Amazon Bedrock Edition)%'  -- Claude and other Marketplace-billed models
  )
  AND line_item_line_item_type = 'Usage'                      -- leaves out tax, credits and refunds
GROUP BY 1, 2, 3, 4, 5, 6
ORDER BY unblended_cost DESC

-- Bedrock cost by team and model, CUR 2.0 in Athena.
-- Replace cur2 with your table and adjust the tag keys to the ones listed above.
SELECT
  date_trunc('day', line_item_usage_start_date)              AS usage_day,
  COALESCE(
    resource_tags['user_team'],                               -- tag on an application inference profile
    tags['iamPrincipal/team'],                                -- tag on the calling IAM role or user
    regexp_extract(line_item_iam_principal, 'assumed-role/([^/]+)', 1),  -- role name as a last resort
    'unallocated'
  )                                                           AS team,
  product['provider']                                         AS model_provider,
  product['model']                                            AS model,
  product['inference_type']                                   AS inference_type,
  bill_billing_entity                                         AS billing_entity,  -- AWS or AWS Marketplace
  SUM(line_item_usage_amount)                                 AS usage_amount,
  SUM(line_item_unblended_cost)                               AS unblended_cost
FROM cur2
WHERE bill_billing_period_start_date = TIMESTAMP '2026-11-01 00:00:00'
  AND (
    product_product_family = 'Amazon Bedrock'
    OR product['product_name'] LIKE '%(Amazon Bedrock Edition)%'  -- Claude and other Marketplace-billed models
  )
  AND line_item_line_item_type = 'Usage'                      -- leaves out tax, credits and refunds
GROUP BY 1, 2, 3, 4, 5, 6
ORDER BY unblended_cost DESC

What each piece relies on, all from the AWS docs:

  • product_product_family is set to the unified value "Amazon Bedrock" on Bedrock line items (product columns).

  • product['provider'], product['model'], product['inference_type'] and product['feature'] are Bedrock-specific keys of the product map (same page).

  • product['product_name'] holds the friendly name of Marketplace products, where line_item_product_code is an opaque ID (CUR query library).

  • resource_tags only holds keys activated as cost allocation tags (resource tags column). line_item_iam_principal and the iamPrincipal/ tags need the caller identity option on the export.

Before you trust the numbers, compare the monthly total with Cost Explorer for the same period. AWS recommends the same check for any CUR query.

Treat this query as an example to adapt, not a tested result: it follows the AWS column documentation for CUR 2.0, so check the column and tag names against your own export first.

Which method to start with

  • One team per IAM role already? Turn on IAM principal data. It needs no code change.

  • Several teams behind one gateway? Give each team an application inference profile, or pass session tags from the gateway.

  • Need feature or customer detail? Add request metadata, turn on invocation logging, and join the logs to CUR at the model and day grain.

Most teams end up with two of these at once. That is where the upkeep starts: tag keys drift, new models appear under new Marketplace service names, and the gateway role changes.

Where Costory fits

You can run all of this yourself, and plenty of teams do, often with Claude writing the queries. Claude plus a billing API works for one person. It gets harder when a whole team needs the same numbers every week.

Costory is a FinOps agent that does the plumbing:

  • It ingests your AWS CUR 2.0 export, Bedrock and Marketplace-billed models included, and normalizes it next to your other clouds and your LLM providers (AWS setup).

  • It allocates Bedrock cost to teams and features from the inference profile tags, the IAM principal and its tags, in one team dimension shared with the rest of your bill (dimensions).

  • It reads Bedrock model invocation logs, joins the request metadata (team, app, customer, feature) to the billed cost by model, day and token type, and splits it by token share. Totals stay as billed. Rows with no match pass through unchanged. To set it up, talk to a human.

  • It answers in Slack and in Claude through MCP: "split last month's Bedrock cost by team and model" (MCP).

Costory recommends, your teams act. If a team could move a workload to a cheaper model, the agent says so with the numbers. Your coding agent or your engineers make the change. The connection is read-only.

Related: LLM cost allocation across OpenAI, Anthropic, Bedrock, Vertex and Mistral, Amazon Bedrock integration, LLM cost allocation use case.

Frequently asked questions

Can I see Amazon Bedrock cost by team in Cost Explorer?

Yes, if the team is carried by a cost allocation tag: on an application inference profile, or on the calling IAM role with IAM principal data turned on. Group by that tag, and by the model product attribute for the model split.

Why is my Claude spend missing from the Amazon Bedrock service?

Anthropic's models on Bedrock are sold by the provider and billed as AWS Marketplace. Each model appears as its own service, named "... (Amazon Bedrock Edition)". Filter on the billing entity or the Bedrock product attributes instead of the Amazon Bedrock service.

Does Bedrock request metadata show up in CUR?

No. Request metadata is written to model invocation logs only, and only when logging is on in that Region. To turn it into cost, multiply logged tokens by your rates, or join the logs to CUR at the model and day grain.

What if all our Bedrock calls go through one gateway?

IAM principal data will show the gateway's role for everything. Give each team its own role or application inference profile, or have the gateway pass session tags when it assumes the role.

Sources

Checked on 26/11/2026.

Put this into practice with your own cost data

30-day free trial. Plans from €250/month, billed annually. We recommend Team (€600/month) once more than one team uses Costory.

First optimization recommendation

The next day

PRICE

From 250€/month, never a % of your bill

Data residency

EU

Access

Read-only on your cloud

From 250€/month, never a % of your bill. 30 days free, no credit card.