Skip to content

Virtual tagging & cost allocation

Virtual tagging attributes cost to a team or category without requiring any tag on the underlying cloud resource. A tag rule matches spend by the dimension your cost data already breaks down by, service, account, usage type, or region, and assigns it a tag_key/tag_value label, such as team → platform. Nothing has to be tagged in AWS, GCP, or any other source for this to work.

Every tag_key works at one grain, the level of detail in the underlying cost data. The grains are service, service and region, service and linked account, usage type, service and usage type, resource, and per actor (an API key or key alias, used by AI activity tags). A rule matches on the dimensions its grain carries, so one rule can match on more than one dimension (for example service and region together). A team tag_key’s rules might each match on service, “anything in Amazon EC2 and Amazon RDS belongs to Platform,” “anything in Amazon SageMaker belongs to ML.” A rule can also match on linked account instead, “account 445566 belongs to Growth”, if that’s how the spend is actually organized.

Two match keys work at any grain: a provider-native tag on the row (tags.<key>, such as an AWS cost-allocation tag) and the cost source itself (cost_source_id, for “all spend from this source”).

If several rules on a tag_key match the same row, the first one wins. Rules are checked in ascending priority order, and ties go to the rule created first.

All the rules for one tag_key have to use the same grain, and the first rule you create sets it. A team tag_key whose first rule matches by service can’t also have a rule at the account grain, mixing grains within one tag_key would double-count spend, since the same dollar can appear in more than one grain’s breakdown.

Once rules exist for a tag_key, every chart and budget that breaks down by that tag_key shows real spend per tag_value, no separate tagging step in the cloud console, no waiting for tags to propagate to the billing export.

A match value is an exact string by default. Each dimension in a rule’s match can use one of these forms instead:

Form Matches when
"AmazonEC2" The value is exactly this string.
["AmazonEC2", "AmazonRDS"] The value is any one of the strings.
{ "prefix": "prod-" } The value starts with the text.
{ "suffix": "-eu" } The value ends with the text.
{ "contains": "api" } The value contains the text.
{ "regex": "^prod-[a-z]+$" } The value matches the regular expression.

An operator object has exactly one key. All forms are case-sensitive: { "prefix": "prod" } doesn’t match PROD-api. A pattern that needs both cases says so itself, for example the regex [Pp]rod. Operand text is capped at 200 characters, and a regex at 100.

Regular expressions use RE2 syntax. RE2 has no backreferences or lookaround, so a rule with one is rejected when you save it, with the engine’s error message.

Example: { "prefix": "prod-" } on a provider tag tags.env assigns prod-eu and prod-us to the same tag value with one rule, where exact matching needs one rule per value.

Creating, editing, or deleting a tag rule re-attributes your account’s entire cost history the moment you save it. There’s no backfill job to run, no snapshot to rebuild, and no waiting period.

This works because attribution isn’t stored anywhere. Charts, tag breakdowns, unit-economics metrics, the MCP tools, and tag recommendations all apply the current rules to the raw cost data at the moment you ask for a number. Add a rule today, chart January of two years ago, and the new rule applies to every matching row in that range immediately.

Example: you notice a service that’s been running for 18 months was never mapped to a team. You add one rule for it. The team breakdown for all 18 months redraws with that spend attributed, including periods you’d already exported, screenshotted, or reported on.

A budget’s spend figure is a stored rollup, not a live query, so it doesn’t move the instant you save a rule. Two halves, and they behave differently:

  • The current period catches up on its own. Saving a rule triggers a rollup for exactly the budgets that tag key can affect, so in practice the budget card updates right away. If that rollup doesn’t run, a transient failure, the nightly sweep picks it up, making ~24 hours the worst case. Either way the whole period is re-summed from its start, not just the spend since your edit.
  • Closed periods never move. A budget period that has already ended keeps the verdict it had. If June’s budget was exceeded under the old rules, it stays exceeded even though a rule you change in August would have put June under the line.

The frozen closed period is deliberate. An alert that already fired, and that someone already acted on, must not silently flip months later because a tagging rule changed. There’s no “recompute a closed period” action, and a rule edit will never do it as a side effect.

This is the most likely reason a chart and a budget disagree. If a tag breakdown shows a team’s history redrawn but the budget beside it still reads the old figure, check which period you’re looking at: a closed one is frozen by design, the current one is a rollup away. Saving a rule shows a message stating this same distinction, charts now, current-period budget alerts within ~24 hours, closed periods keep their original verdict.

Split rules: dividing shared spend by weight

Section titled “Split rules: dividing shared spend by weight”

Some spend can’t be attributed to one team by matching a dimension at all, a shared Kubernetes cluster, a shared observability platform, shared egress. A split rule divides that spend across multiple tag values by weight instead of assigning it to just one.

Example: a $10,000/month observability bill is split 60% Platform / 40% Growth, because that’s roughly how the two teams’ dashboards and alert volume break down. The rule matches the observability service and carries two destinations instead of one:

tag_value weight share of $10,000
Platform 0.6 $6,000
Growth 0.4 $4,000

Platform’s tag-scoped total for the month includes its other, directly-matched spend plus this $6,000. Growth’s includes its own directly-matched spend plus $4,000. Neither team sees the full $10,000, and the $10,000 doesn’t disappear, it’s fully accounted for between the two.

A split rule’s own name (e.g. “Shared observability bill”) is a display label only. It never receives spend itself. A budget scoped directly to that name reads $0 forever, scope the budget to Platform or Growth instead, since that’s where the money actually lands.

Proportional redistribution: dissolving an Untagged bucket

Section titled “Proportional redistribution: dissolving an Untagged bucket”

Not every dollar matches a tag rule. Spend that matches nothing lands in an Untagged bucket by default. Proportional redistribution is a separate, opt-in setting per tag_key that dissolves a chosen bucket, typically Untagged, into all the other tag values. Each tag_key has one redistribution basis, which decides the proportions:

  • Attributed spend (the default): each value’s share is its existing attributed spend that day.
  • Usage metric: each value’s share is its usage that day, from a usage metric you push through usage ingestion.

Example (attributed spend): on a day where Platform has $700 attributed, Growth has $300, and Untagged has $100, turning on redistribution for Untagged splits that $100 70/30 (Platform’s and Growth’s existing shares of $1,000), Platform’s total becomes $770, Growth’s becomes $330, and Untagged drops to $0 for that day.

Two situations leave the bucket alone rather than forcing an answer:

  • The bucket has no spend for the period, there’s nothing to redistribute.
  • Every dollar for the period is in the bucket, there’s no attributed spend to use as a ratio, so Untagged stays visible on the chart. That’s the accurate answer: there’s nothing to divide it against yet.

Turning redistribution on or off changes charts immediately, since it changes what counts as each team’s spend. Tag-scoped budget cards on that tag_key catch up at the next nightly rollup, about 24 hours later. Unlike saving a rule, changing this setting doesn’t trigger a budget rollup. The change shows up in the account’s activity log.

Set the basis on the Cost tags page, in the key’s redistribution control. Under the bucket choice, pick A usage metric you push instead of Each value’s attributed spend. It takes:

  • Usage metric (required): the metric name whose quantity is the weight, such as queries.
  • Source id (optional): limit the metric to one usage connection. Left empty, the metric is summed across every source.
  • Matched on (optional): the dimension in the usage rows that holds the tag value. It defaults to external_customer_id.

The usage rows have to name the tag values your rules assign. If your customer tag_key assigns acme-corp and initech, the usage rows need those strings in the dimension.

For each UTC day:

  • A value’s weight is its summed usage quantity that day. A negative total counts as 0.
  • Only values that have spend that day are weighted. Usage for a name with no spend that day is dropped, and the remaining weights are renormalised to sum to 1.
  • A day where no value has usable usage uses attributed spend for that day instead, so a missing metric never strands the bucket.

Example: the $100 in Untagged on a day where Platform has $700 attributed and Growth has $300. Platform’s usage that day is 100 requests and Growth’s is 300. The usage basis splits the $100 25/75, so Platform’s total becomes $725 and Growth’s becomes $375. The attributed-spend basis would have given $770 and $330. A third name, legacy, with 600 requests but no spend that day is ignored, and the 25/75 split stands.

Two consequences:

  • Usage that arrives late, or is corrected, changes the redistribution for the days it covers, because the shares are computed when the chart is loaded. History can restate.
  • Cost anomaly detection uses the usage basis for a key only when every day it evaluates has usage above 0. If usage starts partway through the window, the detector stays on attributed spend, because the shares would jump on the first usage day and that jump is a configuration change, not an anomaly.

Once the usage basis is saved, the control shows a 30-day preview: how many days would fall back to attributed spend, which usage names no rule assigns (up to 10), and what share of the metric’s usage the rules capture. It also says when the metric or source no longer exists, which otherwise reads as every day falling back with no error.

Redistribution runs per day, not per chart bucket

Section titled “Redistribution runs per day, not per chart bucket”

This is the part that’s easy to get wrong intuitively, so it’s worth stating plainly: splits and redistribution are computed once per UTC day, then that day’s result is what gets summed, grouped, or charted at whatever granularity you’re viewing.

The reason is that proportions taken per day and then summed are not the same as the proportions of the summed period. Take a tag_key with two days of data:

Day Platform Checkout Untagged
Monday $100 $0 $10
Tuesday $100 $100 $0

Redistributed per day, Monday’s $10 goes entirely to Platform (Checkout had $0 that day, so 100% of the ratio is Platform’s). Tuesday has nothing to redistribute. Platform’s two-day total is $100 + $10 + $100 = $210.

Redistributed across the summed two-day period instead, Platform would have $200 already-attributed and Checkout $100, so the $10 would split 2:1, Platform would get $6.67 of it, for $206.67, not $210.

Plutus always uses the first calculation. Fixing the unit at one day is what makes a daily chart, a monthly chart, and a tag-scoped budget agree on the same number for the same spend.

One consequence of this: an hourly view is finer than the unit redistribution operates at, so a day’s redistributed share is spread back across that day’s hours following each tag value’s own hourly usage profile for that day, not evenly. If Platform’s usage on Monday was concentrated in the evening, its share of Monday’s redistributed Untagged spend lands mostly in evening hours too, not spread flat across all 24. This is intentional: the shared cost is meant to land where a team was actually active, not smeared evenly across a day it may not have been running anything. An hourly chart under redistribution won’t match the raw per-hour spend for that reason, that’s expected, not a bug. Totals still reconcile at the day level; individual hours are not independently guaranteed to.

For any given scope and period, the sum of spend across all tag values equals the total spend for that scope. This holds whether or not splits or redistribution are involved, splits preserve it because a rule’s weights always sum to 1, and redistribution preserves it because it only moves dollars between existing buckets, it never creates or removes any. A chart broken down by tag and the plain cost total above it will never disagree about how much was spent in total, only about how it’s divided up.

The Cost tags page has three tabs: Overview, Recommendations, and Manage. The Recommendations tab carries a badge with the number of open suggestions. Deep links with ?tag_key= or ?new_tag_key= open Manage.

The Overview tab opens with four tiles: Tagged coverage, Untagged spend (90d), Biggest gap, and Tag keys. Below them, a “Tag keys by untagged spend” table lists each key with an “N% tagged” badge: green at 90% or more, amber from 50% to 89%, red under 50%. A “vs prior 30d” column shows the change in points, and only when it is 0.5 point or more. The table can be grouped into “Under 50% tagged”, “50 to 90% tagged”, “90% or more tagged”, and “No spend”. The window is fixed at 90 days.

Click a row to chart that key. Spend by shows daily bars across the 90 days, and defaults to the key with the most untagged spend.

The Recommendations tab is a triage inbox headed Suggested tags, split into Open (N) and Dismissed (N). A line above the table gives the monthly spend that could be newly tagged.

The suggestions are a table with one row per suggestion. The columns are Spend to tag, Type (Untagged spend, Provider tag or Customer match), Tag as, Monthly spend and Actions. The table opens sorted by monthly spend, highest first. When suggestions cover more than one tag key, it groups them by tag key. You can search, filter by type, and sort by any column.

  • Tag as shows the tag key and value the rule would assign. When one slice of spend could take either of two keys, such as customer or team, a switch under it picks the key.
  • Accept creates the rule.
  • The More actions menu on each row holds Show details or Hide details and Dismiss. The details explain why Plutus suggests the rule and offer Preview impact. Fuzzy and strong customer matches open with their details showing.
  • A dismissed suggestion moves to Dismissed (N), where Restore brings it back. The confirmation after a dismissal offers Undo.
  • Tick several rows and use Accept N to take them together. The toolbar shows the effect on coverage, such as “62% to 71%”.

Suggestions look back 30 days, ignore candidates under $25 a month, and show at most 10 per kind. Accepting one creates a tag rule, so it follows the same retroactive behaviour as any rule.

A Customer match suggestion proposes one rule per customer, matching the values of a provider tag (tags.<key> on the cost rows) to a customer Plutus knows from your usage ingestion, and assigning the customer’s external_customer_id as the tag value. It saves writing one rule per customer by hand.

Plutus normalises both sides before comparing: case, punctuation and separators are ignored, and trailing legal words (inc, llc, ltd, gmbh, corp, co) are dropped. It compares each tag value against both the customer’s ID and display name. Each suggestion carries one of three labels:

Label What it means How to accept
Exact match The tag value equals the customer’s ID or name apart from case and punctuation. Pre-ticked, and accepted in bulk. Select exact matches (N) ticks any you cleared.
Strong match The tag value differs only by spacing (acme-corp and acmecorp), or is a multi-word subset of the name. Tick it after a look, then accept in bulk.
Possible match A similar spelling, clearly closer to one customer than to any other. One at a time, never in bulk.

A tag value that matches two customers equally well gets no suggestion. Guessing between them could put one customer’s bill on another.

Example: the tag value ACME_Inc is an exact match for the customer acme. acmecorp is a strong match for the customer acme-corp. acmee is only a possible match.

Bulk accept takes up to 100 suggestions in one action.

Preview impact on the rule form, and when accepting a suggestion, runs a dry run without saving. It reads the last 30 days and reports text such as “this rule would claim $X across N rows; $Y of it is untagged today”, and “Untagged for this key: $A now, $B after.”

If an earlier rule already claims some of the spend, the preview shows it as shadowed spend. Lower the new rule’s priority number to take it, since the lowest number wins. The preview runs only when you click it.

The Manage tab can be filtered by coverage (Has rules, No rules yet, Reaching spend, Reaching no spend) and sorted by tagged spend, most rules, or name.

A target is a percentage a tag value’s share of spend is meant to stay under, “infrastructure should be under 20% of what the team tag key attributes.” Set one on the Cost tags page: open the Manage tab, expand a tag key with its Manage toggle, and use Set target (or Edit) next to a tag value. The target must be above 0 and at most 100. Each value gets a meter showing actual against target, with actual reading as over once it passes the target line.

Two things define what the number means:

  • The denominator is the total spend across every tag value the page shows for that key, not the whole account. A 20% target on team → infra means 20% of that total. Untagged is in the denominator unless redistribution dissolves it into the other values. Spend from sources or dimensions that key doesn’t cover isn’t included.
  • The window is the trailing 90 days, the same window the Cost Tags page itself charts. The actual percentage is computed from the numbers already on the page rather than recalculated separately, so the meter and the breakdown beside it can’t disagree.

Targets are presentation only. Nothing fires when a value goes past its target, no alert, no notification, no state change. If you want to be told, create a budget: a budget compares spend against a fixed dollar cap and notifies a channel, which is a different question from a share-of-total ratio. The two are complementary and completely independent.

Two shapes to expect:

  • A split rule’s values are listed individually, because that’s where the money lands. The split rule’s own display label doesn’t appear as a target row, it never receives spend.
  • A tag key’s redistribution bucket can’t have a target. Its spend is dissolved into the other values, so a target on it would read as roughly 0% no matter what. The control is disabled with that reason shown, rather than accepting a target that could never be met.

Setting or clearing a target needs the member role, and the change is recorded in the account’s activity log.

A budget scoped to a tag value (including a team-scoped budget, which is a tag-scoped budget under the team tag_key) is computed with the same rules described above, the same weighted split shares, the same per-day redistribution. A budget and the chart shown next to it are computed the same way and won’t disagree about the same spend.

Two things to know when working with tag-scoped budgets specifically:

  • A budget scoped to a split rule’s own display name (not one of its weighted destinations) reads $0, for the reason described under Split rules above.
  • Splitting and redistribution both work in fractional dollars, and each tag-scoped budget rounds once at the end. That means the sum of several tag-scoped budgets can be a cent or two off from the equivalent account-scoped total. That’s expected rounding, not a reconciliation error.

See Budgets & alerts for how a tag-scoped budget’s spend-so-far figure is computed and rolled up.