Hands-on: Follow Create virtual tags to build a rule and check the spend it matches.
Keys and rules
A tag key names the category you group by, such asTeam. Each rule matches
cost data and assigns a value to that key. For example, a rule can match the
service Amazon EC2 and assign the value Platform. Group your cost view by
Team to compare the Platform team’s spend with other teams.
The following diagram shows how CostGraph assigns Team = Platform to matching
Amazon EC2 charges and groups their cost by team.

Sample Team, Environment, and Product keys in CostGraph.
Rule order and date ranges
CostGraph evaluates rules in order. The first matching rule assigns the value for that key. A charge that matches no rule keeps its own tag with the same key. That tag can be a cloud tag, a Kubernetes label, or a PostgreSQL database label. If the charge has none, it stays untagged for that key. A key bound to a billing export uses only its rules, so CostGraph shows the same spend you invoice. Rules apply to past and future cost data within their date range. Set dates when ownership changes to keep each period assigned to the appropriate team. Billing exports restrict rule changes for dates already reported to your billing platform. Before changing rules used for customer invoices, refer to Protected days.Common uses
Use the same rule across resources that share an owner or purpose.Next steps
Use these guides to create rules, export customer spend, or price your own hardware.Create virtual tags
Create a key, check which charges its rules match, and group costs by the tag.
Generate rules with Graph AI
Describe how you want to attribute spend.
Billing exports
Send the spend assigned to each customer to your billing platform.
Pricing IDs
Assign rates to hardware you own.