
Attribute Amazon Bedrock Cost by IAM Principal and Resource Tag
Two tag types, one Cost Explorer view. This post shows you how to attribute Amazon Bedrock cost to the person, team, or cost center that made the call — and to the environment or application behind it — in about 15 minutes, using tags you already know how to write.
As Amazon Bedrock usage grows across an account, one line item on the bill hides everything you actually want to know: which team, application, or environment spent the money. This walkthrough combines two complementary features: IAM principal cost allocation and resource tagging via application inference profiles, so you can slice Bedrock cost by both "who" and "what" in AWS Cost Explorer . You'll tag the identities and resources, activate the tags, and group cost by each. Everything here is doable from the console.
In this Part 1 of the blog post series, you learn how to attribute Bedrock cost to IAM users and application inference profile. For cost attribution to AWS IAM Identity Center Users (and its external identity provider), refer to Part 2 here .
Primer: two kinds of tags, two questions
Cost allocation tags let you break the bill down by dimensions you define. For Bedrock, two tag types answer two different questions:
- IAM principal tags answer "who called?" These are tags on the AWS Identity and Access Management (IAM) user or role that invoked Bedrock. Amazon Bedrock IAM principal cost allocation automatically records the caller identity and its tags against each request's cost with no code change. See also the deep dive blog post .
- Resource tags answer "what resource?" For Bedrock usage with
bedrock-runtimeendpoint, you invoke through a tagged application inference profile that is a resource you call in place of the model ID, whose tags flow to the bill regardless of who called. Withbedrock-mantleendpoint (Responses, Chat Completions, and Anthropic Messages APIs), you associate the model invocation with a tagged Amazon Bedrock projects and workspaces instead.
The two don't compete; they stack. Every Bedrock line item can carry both its caller's principal tags and the inference profile's resource tags, so you can view the same spend along either axis or filter one by the other.
In this example, we attribute cost along four dimensions:
Tag key | Tag type | Applied to | Answers |
|---|---|---|---|
team , costCenter | IAM principal | IAM users | Which person/team/cost center |
application , costCenter | IAM principal | IAM roles attached to EC2 instance | Which application/cost center |
environment , project | Resource | Application inference profiles & Projects/Workspaces | Which environment/project |
Expected result: In Cost Explorer, group by
costCenter to see spend per cost center across everyone; by application to see spend per app; by environment to see dev vs. prod. Because principal tags and resource tags are independent, you can answer all of these from one dataset.Note: The choice on tag keys and where to apply them (IAM principal or resource) in this blog post is purely for demo/example purpose and is not necessarily a best practice. You can decide an approach that suites better with your requirements. Also, examples in this blog post uses application inference profile with
bedrock-runtime endpoint.Step 1: Tag the principals and the resources
Tag IAM users (IAM console → Users → your user → Tags). Here a user carries
org , team , and costCenter :
Tag IAM roles the same way (Roles → your role → Tags). A workload role used by an application carries
org , application , and costCenter :
Tag the application inference profile. When you create the profile, attach resource tags such as
environment and project , then invoke Bedrock with the profile ARN instead of the model ID. You can create and tag it in the console or with the AWS CLI:aws bedrock create-inference-profile \ --inference-profile-name my-app-dev \ --model-source '{"copyFrom":"arn:aws:bedrock:us-west-2:111122223333:inference-profile/us.anthropic.claude-sonnet-4-6"}' \ --tags key=environment,value=dev key=project,value=my-project \ --region us-west-2Tip: Tags surface for activation only after a tagged principal or resource has generated at least one Bedrock request, and activation is not retroactive. Also, it can take up to 24 hours since that first Bedrock request for the tag to appear in cost allocation tag.
Note: While an application inference profile for
bedrock-runtime endpoint is associated directly to a particular model, Projects and Workspaces for bedrock-mantle endpoint is not associated to any particular model during creation, allowing the model to be specified during invocation time.Step 2: Activate the tags for cost allocation
In the management (payer) account, open the AWS Billing and Cost Management console → Cost allocation tags. Filter by Type = IAM principal, select your principal tag keys (e.g.
application , costCenter , team ), and choose Activate. Repeat with the default (resource) type (e.g. environment and project) .
Activation can take up to 24 hours to take effect. Only tag activation is required for Cost Explorer. You do not need to create an AWS Cost and Usage Report export unless you also want the raw caller-identity ARN column.
Step 3: Group cost in Cost Explorer
In Cost Explorer, set Group by → Tag. The tag picker separates the two families: Resource tags (
environment , project ) and IAM principal tags ( application , costCenter , team ). So you can pick either axis:
Group by an IAM principal tag to see "who." Grouping by
costCenter splits total Bedrock spend across every cost center. Here they are CC-1001 through CC-4004:
Note that
costCenter tag in this example are used by both IAM Users and also the IAM Roles attached to EC2 instances in this example. Every IAM Principal within scope have this costCenter tag.Grouping by
application shows per-application spend, that is used by the IAM Roles attached to EC2 instances. Note the No tag key: application bucket. That's the spend from the IAM users, which don't carry an application tag. Tags attribute only where they're applied:
Group by a resource tag to see "what." Grouping by
environment (carried by the inference profiles) splits the same spend into dev vs. prod:
How the two axes work together
The same dollars are tagged on independent columns, so there's no double-counting, just different lenses on one total. Group by
application to see per-app cost; switch to environment to see per-environment cost; or filter to environment = prod and group by costCenter to see which cost centers drive production spend as shown below.
Principal tags give you accountability by identity; resource tags give you attribution by workload. Used together, they turn a single Bedrock line item into a full chargeback view.
Propagation
Take note that it can take up to 24 hours for the tags to appear in Cost Allocation Tags since the Bedrock request with tagged principal or resource is made, and it can take another 24 hours for the tags to be usable in Cost Explorer after you activate them in Cost Allocation Tags.
Summary
Tag your identities and inference profiles (or Projects/Workspaces for Bedrock mantle endpoint), activate the keys, and Cost Explorer does the rest, attributing Amazon Bedrock spend by who called and what they called, from the same data.
Found this useful? A like helps it reach other builders, and I'd love to hear how you're attributing Bedrock cost in the comments.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article