AWS announced a new feature for Amazon Bedrock that allows detailed cost attribution by tracing inference requests back to the IAM principal initiating the call. This capability, introduced in Part 2 of the blog series, provides visibility into usage by individual users or applications, with optional cost allocation tags enabling aggregation by team, project, or tenant. The solution leverages Amazon Athena and CUDOS dashboards for analysis and visualization, offering flexibility and pre-built visuals tailored to organizational needs.

To implement this, users must set up a Cost and Usage Report (CUR) 2.0 export with IAM principal data enabled, ensuring the line_item_iam_principal column is populated. This setup allows querying via Athena with SQL, offering detailed insights into Bedrock spending by IAM principal and model usage. For example, a sample query can identify which IAM principals are using specific models and their associated costs, providing actionable data for cost management.

The blog explains the process of configuring CUR 2.0 with IAM principal data, including selecting the correct export settings and ensuring proper IAM permissions. It also outlines how to connect CUR data to Athena and run queries for cost analysis, emphasizing the importance of planning storage for increased file sizes due to expanded data. Additionally, it highlights the role of CUDOS dashboards in offering pre-built visualizations for cost tracking.

Source: awsml