What changed
AWS has introduced a new method for tracking and capping Amazon Bedrock spend per IAM principal using AWS Cost and Usage Reports (CUR) 2.0 and AWS Budgets. This approach eliminates the need for custom code, offering native AWS features for cost visibility and enforceable spend limits.
What this means in practice
The solution involves three main parts: attribution, reporting, and enforcement. Amazon Bedrock automatically captures IAM principal identities for every inference request. These identities can be tagged and used for cost allocation. By activating cost allocation tags and creating a CUR 2.0 data export, users can gain detailed line-item analysis through SQL queries. AWS Budgets can then be used to enforce spend limits by applying a Deny IAM policy when thresholds are crossed.
Limitations and availability
The solution requires an AWS account with Amazon Bedrock access enabled and specific permissions to tag IAM principals, activate cost allocation tags, and create budgets. CUR 2.0 data exports and an S3 bucket are needed for detailed analysis. Activation of tags may take up to 48 hours to populate billing data. The approach relies on AWS-native features and does not require custom code for the common case. The solution is available for organizations using IAM roles or users with appropriate permissions.
