Amazon Bedrockの詳細なコスト帰属機能の導入
AWSはAmazon Bedrockの推論コストをIAMプリンシパル単位で自動的に属性付与する詳細なコスト配分機能を発表し、クラウドAIコストの可視化と管理を強化した。
キーポイント
詳細なコスト属性付与の導入
Amazon Bedrockの推論コストをIAMプリンシパル(ユーザー、ロール、フェデレーティッドID)単位で自動的に追跡し、AWS請求に反映する機能が追加された。
ワークフロー変更不要の実装
既存のワークフローを変更せず、追加リソース管理も不要で、すべてのモデルにわたって機能する。
コスト割り当てタグによる集計
オプションのコスト割り当てタグを使用して、チーム、プロジェクト、カスタム次元ごとにAWS Cost ExplorerとCUR 2.0でコストを集計できる。
具体的なデータ表示例
CUR 2.0でIAMプリンシパルごとの呼び出しと支出を確認でき、例としてAliceとBobのユーザーごとのトークン使用コストが示されている。
CUR 2.0による詳細なコスト分析
Cost and Usage Report (CUR 2.0)は、IAMプリンシパル(ユーザーまたはロール)、使用タイプ(リージョン・モデル・トークン方向)、タグの3つの次元でコストを分析可能。これによりユーザー別、モデル別、チーム別の詳細なコスト分析ができる。
APIキー使用時のコスト帰属
Amazon Bedrock APIキーを使用した場合も、APIキーはIAMプリンシパルに関連付けられており、リクエストは対応するIAMアイデンティティに帰属される。これによりAPIキーを配布する組織でもコスト追跡が可能。
IAMロールによるアプリケーション別コスト追跡
本番ワークロードでは、アプリケーションがIAMロールを引き受けてAmazon Bedrockを呼び出すことで、CUR 2.0レポートでアプリケーション別のコスト可視化が可能。ロールにタグを付けることでプロジェクトやコストセンター別の集計もできる。
影響分析・編集コメントを表示
影響分析
この機能は、AI推論コストがクラウド支出の重要な部分を占めるようになる中で、企業の財務管理とコスト最適化を支援する。特に大規模なAI導入企業にとって、部門やプロジェクト単位でのコスト配分と責任の明確化に貢献し、AI投資のROI向上につながる可能性がある。
編集コメント
AWSのAIサービスエコシステムの成熟度を示す実用的なアップデート。企業のAI導入が本格化する中で、コスト管理の重要性が高まっていることを反映している。
AI推論(AI inference)がクラウド支出の重要な割合を占めるようになるにつれ、誰が、何がコストを発生させているかを理解することは、チャージバック、コスト最適化、財務計画にとって不可欠です。本日、Amazon Bedrock推論の詳細なコスト属性付け(granular cost attribution)を発表します。
Amazon Bedrockは現在、推論コストを呼び出しを行ったIAMプリンシパル(IAM principal)に自動的に帰属させます。IAMプリンシパルは、IAMユーザー、アプリケーションによって引き受けられたロール、OktaやEntra IDのようなプロバイダーからのフェデレーティッドアイデンティティ(federated identity)である可能性があります。この属性付けはAWS Billingに流れ、モデル間で機能し、管理するリソースはなく、既存のワークフローへの変更も必要ありません。オプションのコスト配分タグ(cost allocation tags)を使用すると、AWS Cost ExplorerおよびAWSコストと使用量レポート(CUR 2.0)で、チーム、プロジェクト、またはカスタムディメンション別にコストを集計できます。
この記事では、Amazon Bedrockの詳細なコスト属性付けの仕組みを共有し、コスト追跡シナリオの例を順を追って説明します。
詳細なコスト属性付けの仕組み
データエクスポート設定でIAMプリンシパルデータを有効にすると、CUR 2.0で、どのAWS Identity and Access Management(IAM)プリンシパルがAmazon Bedrockを呼び出しているか、およびそれぞれがいくら支出しているかを確認できます。次の例に示すとおりです:
| line_item_iam_principal | line_item_usage_type | line_item_unblended_cost |
|---|---|---|
| arn:aws:iam::123456789012:user/alice | USE1-Claude4.6Sonnet-input-tokens | $0.069 |
| arn:aws:iam::123456789012:user/alice | USE1-Claude4.6Sonnet-output-tokens | $0.214 |
| arn:aws:iam::123456789012:user/bob | USE1-Claude4.6Opus-input-tokens | $0.198 |
| arn:aws:iam::123456789012:user/bob | USE1-Claude4.6Opus-output-tokens | $0.990 |
ここでは、AliceがClaude 4.6 Sonnetを使用し、BobがClaude 4.6 Opusを使用しており、それぞれが入力トークンと出力トークンにいくら支出しているかがわかります。次の表は、各アイデンティティタイプに対して line_item_iam_principal 列に含まれる内容を示しています:
| Amazon Bedrock推論の呼び出し方法 | line_item_iam_principal |
|---|---|
| AWS IAM User | …user/alice |
| Bedrock key (maps to IAM User) | …user/BedrockAPIKey-234s |
| AWS IAM Role (e.g. AWS Lambda function) | …assumed-role/AppRole/session |
| Federated User (e.g. from an identity provider) | …assumed-role/Role/user@acme.org |
集計とCost Explorerのためのタグ追加
チーム、プロジェクト、またはコストセンター別にコストを集計するには、IAMプリンシパルにタグを追加します。タグは2つの方法で課金データに流れます:
- プリンシパルタグ(Principal tags) はIAMユーザーまたはロールに直接アタッチされます。一度設定すると、そのプリンシパルからのすべてのリクエストに適用されます。
- セッションタグ(Session tags) は、ユーザーまたはアプリケーションが一時的な認証情報を取得するためにIAMロールを引き受けるとき、またはアイデンティティプロバイダーのアサーションに埋め込まれて動的に渡されます。詳細については、Passing session tags in AWS STS を参照してください。
AWS Billingでコスト配分タグとしてアクティベートした後、両方のタグタイプは iamPrincipal/ プレフィックス付きでCUR 2.0のタグ列に表示されます。次の例に示すとおりです:
| Bedrockの呼び出し方法 | line_item_iam_principal | tags |
|---|---|---|
| AWS IAM User | …user/alice | {"iamPrincipal/team":"ds"} |
| AWS IAM Role | …assumed-role/AppRole/session | {"iamPrincipal/project":"chatbot"} |
| Federated User | …assumed-role/Role/user@acme.org | {"iamPrincipal/team":"eng"} |
コスト配分戦略の構築に関するさらなるガイダンスについては、Best Practices for Tagging AWS Resources を参照してください。
シナリオ別クイックスタート
セットアップは、ユーザーとアプリケーションがAmazon Bedrockを呼び出す方法によって異なります。次の表は、各アクセスパターンに対してCUR 2.0で利用可能な属性付けと、タグベースの集計のために設定する内容をまとめたものです:
| セットアップ | CUR 2.0での属性付け | 集計 + Cost Explorerのためのタグ追加方法 | シナリオ |
|---|---|---|---|
| IAMユーザーまたはAPIキーを持つ開発者 | 各ユーザーのARNがCUR 2.0に表示される | IAMユーザーにタグをアタッチする | 1 |
| IAMロールを持つアプリケーション | 各ロールのARNがCUR 2.0に表示される | IAMロールにタグをアタッチする | 2 |
| IdP(アイデンティティプロバイダー)経由で認証するユーザー | ARN内のセッション名でユーザーを識別 | IdPからセッション名とタグを渡す | 3 |
| BedrockにプロキシするLLMゲートウェイ | ゲートウェイのロールのみ表示(全ユーザーに対して単一のアイデンティティ) | セッション名とタグ付きのユーザーごとのAssumeRoleを追加する | 4 |
注記: シナリオ1〜3の場合、CUR 2.0の line_item_iam_principal 列は呼び出し元ごとのアイデンティティ属性付けを提供します。タグは、カスタムディメンション(チーム、コストセンター、テナント)別に集計したり、Cost Explorerを視覚的分析やアラートに使用したりする場合にのみ必要です。シナリオ4の場合、ユーザーレベルの属性付けを得るには、ユーザーごとのセッション管理が必要です。これがないと、トラフィックはゲートウェイの単一のロールに帰属します。
タグを追加した後、AWS Billingコンソールまたは UpdateCostAllocationTagsStatus API経由でコスト配分タグをアクティベートしてください。タグは24〜48時間以内にCost ExplorerおよびCUR 2.0に表示されます。
以下のセクションでは、いくつかの一般的なシナリオを順を追って説明します。
シナリオ1: IAMユーザーとAPIキーによるユーザーごとの追跡
ユースケース: 小規模チーム、開発環境、または個々の開発者がIAMユーザー認証情報またはAmazon Bedrock APIキーを使用する迅速なプロトタイピング。
仕組み:
各チームメンバーは長期的な認証情報を持つ専用のIAMユーザーを持っています。例えば、user-1またはuser-2がAmazon Bedrockを呼び出すと、Amazon Bedrockは認証中に自動的に彼らのIAMユーザーAmazonリソースネーム(ARN)をキャプチャします。CUR 2.0には、誰がいくら支出しているかが表示されます。
チーム、コストセンター、または別のディメンション(例えば、データサイエンスチームメンバー全体の総支出を確認するため)別にコストを集計したい場合は、IAMユーザーにタグをアタッチします。タグはIAMコンソール、AWS Command Line Interface(AWS CLI)、またはAWS APIで追加できます。次の例はAWS CLIを使用しています:
# データサイエンスチームのユーザーにタグ付け
aws iam tag-user \
--user-name user-1 \
--tags Key=team,Value="BedrockDataScience" Key=cost-center,Value="12345"
aws iam tag-user \
--user-name user-2 \
--tags Key=team,Value="BedrockDataScience" Key=cost-center,Value="12345"
**CUR 2.0に表示される内容:**
コストと使用量レポート(Cost and Usage Report, CUR)は、個々のユーザーIDとそのタグの両方を記録し、以下の例に示すように分析のための2つの次元を提供します。
<table class="styled-table" border="1px" cellpadding="10px">
<tbody>
<tr>
<td style="padding: 10px;border: 1px solid #dddddd"><strong>line_item_iam_principal</strong></td>
<td style="padding: 10px;border: 1px solid #dddddd"><strong>line_item_usage_type</strong></td>
<td style="padding: 10px;border: 1px solid #dddddd"><strong>line_item_unblended_cost</strong></td>
<td style="padding: 10px;border: 1px solid #dddddd"><strong>tags</strong></td>
</tr>
<tr>
<td style="padding: 10px;border: 1px solid #dddddd">arn:aws:iam::123456789012:user/user-1</td>
<td style="padding: 10px;border: 1px solid #dddddd">USE1-Claude4.6Sonnet-input-tokens</td>
<td style="padding: 10px;border: 1px solid #dddddd">$0.0693</td>
<td style="padding: 10px;border: 1px solid #dddddd">{“iamPrincipal/team”:”BedrockDataScience”,”iamPrincipal/cost-center”:”12345″}</td>
</tr>
<tr>
<td style="padding: 10px;border: 1px solid #dddddd">arn:aws:iam::123456789012:user/user-1</td>
<td style="padding: 10px;border: 1px solid #dddddd">USE1-Claude4.6Sonnet-output-tokens</td>
<td style="padding: 10px;border: 1px solid #dddddd">$0.2145</td>
<td style="padding: 10px;border: 1px solid #dddddd">{“iamPrincipal/team”:”BedrockDataScience”,”iamPrincipal/cost-center”:”12345″}</td>
</tr>
<tr>
<td style="padding: 10px;border: 1px solid #dddddd">arn:aws:iam::123456789012:user/user-2</td>
<td style="padding: 10px;border: 1px solid #dddddd">USE1-Claude4.6Opus-input-tokens</td>
<td style="padding: 10px;border: 1px solid #dddddd">$0.1980</td>
<td style="padding: 10px;border: 1px solid #dddddd">{“iamPrincipal/team”:”BedrockDataScience”,”iamPrincipal/cost-center”:”12345″}</td>
</tr>
<tr>
<td style="padding: 10px;border: 1px solid #dddddd">arn:aws:iam::123456789012:user/user-2</td>
<td style="padding: 10px;border: 1px solid #dddddd">USE1-Claude4.6Opus-output-tokens</td>
<td style="padding: 10px;border: 1px solid #dddddd">$0.9900</td>
<td style="padding: 10px;border: 1px solid #dddddd">{“iamPrincipal/team”:”BedrockDataScience”,”iamPrincipal/cost-center”:”12345″}</td>
</tr>
</tbody>
</table>
`line_item_usage_type`列は、リージョン、モデル、トークンの方向(入力対出力)をエンコードしているため、「user-1はSonnetの入力トークンと出力トークンにそれぞれいくら使ったか?」や「OpusとSonnetのどちらを誰が使っているか?」といった質問に答えることができます。
このデータから、いくつかの方法でコストを分析できます:
* **ユーザー別:** `line_item_iam_principal`でフィルタリングして、各個人が正確にいくら使ったかを確認します。これは、ヘビーユーザーの特定や個々の実験コストの追跡に役立ちます。
* **モデル別:** `line_item_usage_type`でフィルタリングして、モデルごとの支出を比較します。例えば、OpusのコストとSonnetのコストを誰が発生させているかなどです。
* **チーム別:** `iamPrincipal/team`でグループ化して、データサイエンスチームメンバー全体の総支出を確認します。これは部門間のコスト配賦(チャージバック)に役立ちます。
このアプローチは、管理可能な数のユーザーがいて、可能な限りシンプルな設定を望む場合に理想的です。各ユーザーの認証情報が課金において直接的に本人を識別し、タグによってコストをより高次の次元に集計できます。
**Amazon Bedrock APIキーの使用:** Amazon Bedrockは、他のAIプロバイダーと同様の簡素化された認証体験のために、APIキー(API keys)もサポートしています。APIキーはIAMプリンシパルに関連付けられます。APIキーを使用して行われたリクエストは、対応するIAMアイデンティティに帰属されるため、同じ`line_item_iam_principal`とタグベースの帰属が適用されます。これは、開発者にAPIキーを配布したり、アプリケーションに組み込んだりする組織でも、発生元のIAMユーザーまたはロールまでコストを追跡できることを意味します。
## シナリオ2: IAMロールによるアプリケーションごとの追跡
**ユースケース:** 人間ではなくアプリケーションがAmazon Bedrockを呼び出す本番ワークロードで、プロジェクトやサービスごとにコストを追跡したい場合。
**仕組み:**
例えば、ドキュメント処理サービス(app-1)とチャットサービス(app-2)という2つのバックエンドアプリケーションがあるとします。各アプリケーションはコンピュートインフラストラクチャ(Amazon EC2、AWS Lambda、Amazon Elastic Container Service (Amazon ECS)など)上で実行され、Amazon Bedrockを呼び出すために専用のIAMロールを引き受けます(assume)。どちらかのアプリケーションがAmazon Bedrockを呼び出すと、引き受けられたロールのARNが自動的に記録されます。この帰属情報はCUR 2.0レポートに流れ、アプリケーションごとのコスト可視性を提供します。
ロール名を含む`line_item_iam_principal`でフィルタリングしてアプリケーションごとの総支出を確認したり、`line_item_usage_type`でフィルタリングしてサービス間のモデル使用量を比較したりできます。タグはオプションです。アプリケーションがリクエストやバッチジョブごとに一意のセッション名を生成する場合、さらに詳細なレベルでコストを追跡できます。
プロジェクト、コストセンター、または他の次元(例えば、DocFlowとChatBackendの総支出を比較するため)でコストを集計したい場合は、IAMロールにタグを付与します:
```bash
# ドキュメント処理ロールにタグを付与
aws iam tag-role \
--role-name Role-1 \
--tags Key=project,Value="DocFlow" Key=cost-center,Value="12345"
# チャットサービスロールにタグを付与
aws iam tag-role \
--role-name Role-2 \
--tags Key=project,Value="ChatBackend" Key=cost-center,Value="12345"app-1がRole-1を引き受け(assume)、Amazon Bedrockを呼び出すと、リクエストは引き受けられたロールセッションに帰属されます。ロールのタグは自動的に課金に流れます。
CUR 2.0に表示される内容:
line_item_iam_principalは、以下の例に示すように、セッション名を含む完全な引き受けられたロールのARN(assumed-role ARN)を表示します:
<table class="styled-table" border="1px" cellpadding="10px">
<tbody>
<tr>
<td style="padding: 10px;border: 1px solid #dddddd"><strong>line_item_iam_principal</strong></td>
<td style="padding: 10px;border: 1px solid #dddddd"><strong>line_item_usage_type</strong></td>
<td style="padding: 10px;border: 1px solid #dddddd"><strong>line_item_unblended_cost</strong></td>
<td style="padding: 10px;border: 1px solid #dddddd"><strong>tags</strong></td>
</tr>
<tr>
<td style="padding: 10px;border: 1px solid #dddddd">arn:aws:sts::123456789012:assumed-role/Role-1/session-123</td>
<td style="padding: 10px;border: 1px solid #dddddd">USE1-Claude4.6Sonnet-input-tokens</td>
<td style="padding: 10px;border: 1px solid #dddddd">$0.0330</td>
<td style="padding: 10px;border: 1px solid #dddddd">{“iamPrincipal/project”:”DocFlow”,”iamPrincipal/cost-center”:”12345″}</td>
</tr>
<tr>
<td style="padding: 10px;border: 1px solid #dddddd">arn:aws:sts::123456789012:assumed-role/Role-1/session-123</td>
<td style="padding: 10px;border: 1px solid #dddddd">USE1-Claude4.6Opus-output-tokens</td>
<td style="padding: 10px;border: 1px solid #dddddd">$0.1650</td>
<td style="padding: 10px;border: 1px solid #dddddd">{“iamPrincipal/project”:”DocFlow”,”iamPrincipal/cost-center”:”12345″}</td>
</tr>
<tr>
<td style="padding: 10px;border: 1px solid #dddddd">arn:aws:sts::123456789012:assumed-role/Role-2/session-456</td>
<td style="padding: 10px;border: 1px solid #dddddd">USE1-NovaLite-input-tokens</td>
<td style="padding: 10px;border: 1px solid #dddddd">$0.0810</td>
<td style="padding: 10px;border: 1px solid #dddddd">{{“iamPrincipal/project”:”ChatBackend”,”iamPrincipal/cost-center”:”12345″}</td>
</tr>
<tr>
<td style="padding: 10px;border: 1px solid #dddddd">arn:aws:sts::123456789012:assumed-role/Role-2/session-456</td>
<td style="padding: 10px;border: 1px solid #dddddd">USE1-NovaLite-output-tokens</td>
<td style="padding: 10px;border: 1px solid #dddddd">$0.0500</td>
<td style="padding: 10px;border: 1px solid #dddddd">{“iamPrincipal/project”:”ChatBackend”,”iamPrincipal/cost-center”:”12345″}</td>
</tr>
</tbody>
</table>
これにより、複数の分析オプションが得られます:
- ロールでフィルタリング: ARNのロール名部分を使用して、アプリケーションごとの総支出を確認します。
- セッションでフィルタリング: セッション名を使用して、リクエストやバッチジョブごとのコストを追跡します。
- プロジェクトで集計:
原文を表示
As AI inference grows into a significant share of cloud spend, understanding who and what are driving costs is essential for chargebacks, cost optimization, and financial planning. Today, we’re announcing granular cost attribution for Amazon Bedrock inference.
Amazon Bedrock now automatically attributes inference costs to the IAM principal that made the call. An IAM principal can be an IAM user, a role assumed by an application, or a federated identity from a provider like Okta or Entra ID. Attribution flows to your AWS Billing and works across models, with no resources to manage and no changes to your existing workflows. With optional cost allocation tags, you can aggregate costs by team, project, or custom dimension in AWS Cost Explorer and AWS Cost and Usage Reports (CUR 2.0).
In this post, we share how Amazon Bedrock’s granular cost attribution works and walk through example cost tracking scenarios.
How granular cost attribution works
In your CUR 2.0, you can see which AWS Identity and Access Management (IAM) principals are calling Amazon Bedrock and what each is spending when you enable IAM principal data in your data export configuration, as shown in the following example:
line_item_iam_principal
line_item_usage_type
line_item_unblended_cost
arn:aws:iam::123456789012:user/alice
USE1-Claude4.6Sonnet-input-tokens
$0.069
arn:aws:iam::123456789012:user/alice
USE1-Claude4.6Sonnet-output-tokens
$0.214
arn:aws:iam::123456789012:user/bob
USE1-Claude4.6Opus-input-tokens
$0.198
arn:aws:iam::123456789012:user/bob
USE1-Claude4.6Opus-output-tokens
$0.990
Here, you can see that Alice is using Claude 4.6 Sonnet and Bob is using Claude 4.6 Opus, and what each is spending in input and output tokens. The following table shows what the line_item_iam_principal column contains for each identity type:
How you call Amazon Bedrock Inference
line_item_iam_principal
AWS IAM User
…user/alice
Bedrock key (maps to IAM User)
…user/BedrockAPIKey-234s
AWS IAM Role (e.g. AWS Lambda function)
…assumed-role/AppRole/session
Federated User (e.g. from an identity provider)
…assumed-role/Role/user@acme.org
Adding tags for aggregation and Cost Explorer
To aggregate costs by team, project, or cost center, add tags to your IAM principals. Tags flow to your billing data in two ways:
- Principal tags are attached directly to IAM users or roles. Set them once and they apply to every request from that principal.
- Session tags are passed dynamically when a user or application assumes an IAM role to obtain temporary credentials or embedded in identity provider assertions. To learn more, see Passing session tags in AWS STS.
After activation as cost allocation tags in AWS Billing, both tag types appear in the tags column of CUR 2.0 with the iamPrincipal/ prefix, as shown in the following example:
How you call Bedrock
line_item_iam_principal
tags
AWS IAM User
…user/alice
{“iamPrincipal/team”:”ds”}
AWS IAM Role
…assumed-role/AppRole/session
{“iamPrincipal/project”:”chatbot”}
Federated User
…assumed-role/Role/user@acme.org
{“iamPrincipal/team”:”eng”}
For more guidance on building a cost allocation strategy, see Best Practices for Tagging AWS Resources.
Quickstart by scenario
Your setup depends on how your users and applications call Amazon Bedrock. The following table summarizes the attribution available in CUR 2.0 for each access pattern and what to configure for tag-based aggregation:
Your setup
CUR 2.0 attribution
How to add tags for aggregation + Cost Explorer
Scenario
Developers with IAM users or API keys
Each user’s ARN appears in CUR 2.0
Attach tags to IAM users
1
Applications with IAM roles
Each role’s ARN appears in CUR 2.0
Attach tags to IAM roles
2
Users authenticate through an IdP
session name in ARN identifies users
Pass session name and tags from your IdP
3
LLM gateway proxying to Bedrock
Only shows gateway’s role (one identity for all users)
Add per-user AssumeRole with session name and tags
4
Note: For Scenarios 1–3, the line_item_iam_principal column in CUR 2.0 gives you per-caller identity attribution. Tags are only needed if you want to aggregate by custom dimensions (team, cost center, tenant) or use Cost Explorer for visual analysis and alerts. For Scenario 4, per-user session management is required to get user-level attribution. Without it, traffic is attributed to the gateway’s single role.
After adding tags, activate your cost allocation tags in the AWS Billing console or via UpdateCostAllocationTagsStatus API. Tags appear in Cost Explorer and CUR 2.0 within 24–48 hours.
The following sections walk through a few common scenarios.
Scenario 1: Per-user tracking with IAM users and API keys
Use case: Small teams, development environments, or rapid prototyping where individual developers use IAM user credentials or Amazon Bedrock API keys.
How it works:
Each team member has a dedicated IAM user with long-term credentials. When either user-1 or user-2, for example, calls Amazon Bedrock, Amazon Bedrock automatically captures their IAM user Amazon Resource Name (ARN) during authentication. Your CUR 2.0 shows who is spending what.
If you want to roll up costs by team, cost center, or another dimension — for example, to see total spend across data science team members — attach tags to your IAM users. You can add tags in the IAM console, AWS Command Line Interface (AWS CLI), or the AWS API. The following example uses the AWS CLI:
# Tag the data science team's users
aws iam tag-user \
--user-name user-1 \
--tags Key=team,Value="BedrockDataScience" Key=cost-center,Value="12345"
aws iam tag-user \
--user-name user-2 \
--tags Key=team,Value="BedrockDataScience" Key=cost-center,Value="12345"What appears in CUR 2.0:
The Cost and Usage Report captures both the individual user identity and their tags, giving you two dimensions for analysis as shown in the following example:
line_item_iam_principal
line_item_usage_type
line_item_unblended_cost
tags
arn:aws:iam::123456789012:user/user-1
USE1-Claude4.6Sonnet-input-tokens
$0.0693
{“iamPrincipal/team”:”BedrockDataScience”,”iamPrincipal/cost-center”:”12345″}
arn:aws:iam::123456789012:user/user-1
USE1-Claude4.6Sonnet-output-tokens
$0.2145
{“iamPrincipal/team”:”BedrockDataScience”,”iamPrincipal/cost-center”:”12345″}
arn:aws:iam::123456789012:user/user-2
USE1-Claude4.6Opus-input-tokens
$0.1980
{“iamPrincipal/team”:”BedrockDataScience”,”iamPrincipal/cost-center”:”12345″}
arn:aws:iam::123456789012:user/user-2
USE1-Claude4.6Opus-output-tokens
$0.9900
{“iamPrincipal/team”:”BedrockDataScience”,”iamPrincipal/cost-center”:”12345″}
The line_item_usage_type column encodes the region, model, and token direction (input vs. output), so you can answer questions like “How much did user-1 spend on Sonnet input tokens vs. output tokens?” or “Who’s using Opus vs. Sonnet?”
From this data, you can analyze costs in several ways:
- By user: Filter on line_item_iam_principal to see exactly how much each person spent. This is useful for identifying heavy users or tracking individual experimentation costs.
- By model: Filter on line_item_usage_type to compare per-model spend, for example, who’s driving Opus costs vs. Sonnet.
- By team: Group by iamPrincipal/team to see total spend across data science team members. This is useful for departmental chargeback.
This approach is ideal when you have a manageable number of users and want the simplest possible setup. Each user’s credentials directly identify them in billing, and tags let you roll up costs to higher-level dimensions.
Using Amazon Bedrock API keys: Amazon Bedrock also supports API keys for a simplified authentication experience similar to other AI providers. API keys are associated with IAM principals. Requests made with API keys are attributed to the corresponding IAM identities, so the same line_item_iam_principal and tag-based attribution applies. This means organizations distributing API keys to developers or embedding them in applications can still track costs back to the originating IAM user or role.
Scenario 2: Per-application tracking with IAM roles
Use case: Production workloads where applications (not humans) call Amazon Bedrock, and you want to track costs by project or service.
How it works:
You have two backend applications, for example, a document processing service (app-1) and a chat service (app-2). Each application runs on compute infrastructure (Amazon EC2, AWS Lambda, Amazon Elastic Container Service (Amazon ECS), etc.) and assumes a dedicated IAM role to call Amazon Bedrock. When either application calls Amazon Bedrock, the assumed-role ARN is automatically captured. This attribution flows to your CUR 2.0 report, giving you per-application cost visibility.
You can filter by line_item_iam_principal, which contains the role name, to see total spend per application, or by line_item_usage_type to compare model usage across services. Tags are optional. If your application generates unique session names per request or batch job, you can track costs at an even finer level of detail.
If you want to roll up costs by project, cost center, or another dimension — for example, to compare total spend across DocFlow vs. ChatBackend — attach tags to the IAM roles:
# Tag the document processing role
aws iam tag-role \
--role-name Role-1 \
--tags Key=project,Value="DocFlow" Key=cost-center,Value="12345"
# Tag the chat service role
aws iam tag-role \
--role-name Role-2 \
--tags Key=project,Value="ChatBackend" Key=cost-center,Value="12345"When app-1 assumes Role-1 and calls Amazon Bedrock, the request is attributed to the assumed-role session. The role’s tags flow through to billing automatically.
What appears in CUR 2.0:
The line_item_iam_principal shows the full assumed-role ARN including the session name, as shown in the following example:
line_item_iam_principal
line_item_usage_type
line_item_unblended_cost
tags
arn:aws:sts::123456789012:assumed-role/Role-1/session-123
USE1-Claude4.6Sonnet-input-tokens
$0.0330
{“iamPrincipal/project”:”DocFlow”,”iamPrincipal/cost-center”:”12345″}
arn:aws:sts::123456789012:assumed-role/Role-1/session-123
USE1-Claude4.6Opus-output-tokens
$0.1650
{“iamPrincipal/project”:”DocFlow”,”iamPrincipal/cost-center”:”12345″}
arn:aws:sts::123456789012:assumed-role/Role-2/session-456
USE1-NovaLite-input-tokens
$0.0810
{{“iamPrincipal/project”:”ChatBackend”,”iamPrincipal/cost-center”:”12345″}
arn:aws:sts::123456789012:assumed-role/Role-2/session-456
USE1-NovaLite-output-tokens
$0.0500
{“iamPrincipal/project”:”ChatBackend”,”iamPrincipal/cost-center”:”12345″}
This gives you multiple analysis options:
- Filter by role: See total spend per application using the role name portion of the ARN.
- Filter by session: Track costs per request or batch job using the session name.
Aggregate by project: G
関連記事
AWSがS3 Filesを導入、S3バケットへのファイルシステムアクセスを実現
AWSはS3 Filesを発表し、ユーザーがAmazon S3バケットをマウントして標準ファイルシステムインターフェースでデータにアクセスできるようにした。アプリケーションは標準ファイル操作で読み書きでき、システムが自動的にS3リクエストに変換するため、コンピュートサービスがS3に保存されたデータを直接扱える。
AWSが自動インシデント調査のためのDevOpsエージェントを一般提供開始
AWSは、開発者と運用者がAWS環境での問題のトラブルシューティング、デプロイメントの分析、運用タスクの自動化を支援する生成AI搭載アシスタント「DevOps Agent」の一般提供を開始した。
Amazon Nova Multimodal Embeddingsで強化する動画意味検索
Amazonは、動画内の特定シーンを高速・高精度に検索できる「Nova Multimodal Embeddings」を発表した。スポーツ放送局やスタジオが、プレイヤーの得点シーンや特定俳優のシーンを瞬時に抽出できるようになる。