Sub topic 11
Finding untagged spend
This chapter assumes you can use the Cost Explorer console, know what a cost allocation tag is, and have already activated at least one tag key such as Project. Untagged spend is cost that carries no value for a tag key you care about. It cannot be assigned to a project, team or environment, so it weakens every tag-based report.
How untagged spend appears
When you group a report by a tag key, Cost Explorer returns one group per tag value. Cost from resources that have no value for that key goes into a group with an empty tag value. The console labels it "No tag key: Project" (the exact label can vary). The CLI returns an empty value after the key, such as Project$.
Three situations produce this group:
- The resource was never tagged.
- The resource was tagged after the cost was incurred. Tags are not applied retroactively, so earlier usage stays untagged.
- The resource type does not support tags, or the cost is not tied to a taggable resource. Examples are some data transfer charges, support fees and taxes.
The second case matters most when you investigate. Cost Explorer starts using an activated key only from the activation time forward, so very old months can show a large untagged share that you cannot fix.
Quantify the gap
Run the grouped query from the CLI. The End date is exclusive.
aws ce get-cost-and-usage \
--time-period Start=2026-10-01,End=2026-11-01 \
--granularity MONTHLY \
--metrics UnblendedCost \
--group-by Type=TAG,Key=ProjectAdd the group amounts. Divide the amount in the empty-value group by the total to get your untagged percentage. Use the same metric you use for other reports, so the numbers stay comparable.
Find which services cause it
A total tells you how big the problem is. It does not tell you where to fix it. Filter the report to the untagged group, then group by service. In the console, set the tag filter to the key and choose the "No tag key" option, then group by Service. The largest services are your first targets.
The diagram below summarizes the loop.
Trace spend to resources
After you find a service, group by Usage type or, if resource-level data is enabled, by resource. Then use the Tag Editor in the console to list resources of that type that lack the tag. For an EC2 instance, apply the missing tags:
aws ec2 create-tags \
--resources i-0123456789abcdef0 \
--tags Key=Project,Value=checkout Key=Environment,Value=prodNew usage is attributed to the tag from that point on. Past usage stays untagged.
Reduce it for good
Fixing resources one by one does not scale. Combine these measures:
- Make tags required at creation, using tag policies or IAM conditions (covered in the next chapters on governance).
- Review the untagged percentage on a schedule and set a target, for example under 5%.
- Assign shared or untaggable costs with Cost Categories instead of leaving them unowned.
Exercise
Last month you tagged an instance with Project=checkout on the 15th. Its charges for the 1st to the 14th still appear in the untagged group. Why?
Show answer
Cost allocation tags are not applied retroactively. Only usage after the tag is applied (and the key activated) is attributed to the tag value, so earlier charges stay untagged.
Exercise
Your Project report shows an untagged group of $2,000 out of $10,000 total. What is the untagged percentage, and what is your next step in Cost Explorer?
Show answer
20%. Filter to the untagged group, group by Service, and tag resources in the largest services first.