A solid AWS tagging strategy is boring on purpose: five or six required tags that answer "who owns this, who pays for it, which environment is it, and how careful should I be with it", one casing rule, a list of allowed values, and enforcement in layers. Tags get applied by default in Terraform, guardrails block the worst gaps at creation time, and detective checks catch the rest.
That's the whole answer. The rest of this post is how to get there without the classic outcome: 14 spellings of Environment, a CostCenter tag nobody activated in billing, and an EC2 instance tagged owner: dave where Dave left in 2023.
We'll cover the baseline schema, AWS tagging best practices straight from the docs, a working AWS tag policy example, how to actually enforce tags in AWS, AWS cost allocation tags, and Terraform default_tags. Then a checklist you can paste into your next review.
Why your AWS tagging strategy keeps falling apart
Tagging rarely fails because people don't care. It fails because nobody owns the schema and nothing checks it.
The usual failure modes:
- Casing chaos. AWS tag keys and values are case sensitive.
Env,env,Environmentandenvironmentare four different keys, and your cost report treats them that way. - Tags that answer nothing. A
Nametag on everything and nothing else. Great for the console, useless for chargeback. - Values with no allowed list.
prod,production,prd,Prod-EU. Each one is a separate line in Cost Explorer. - ClickOps drift. Someone fixes an incident in the console at 2 a.m., creates a resource by hand, and it never gets tagged. Nobody notices until the bill does.
- Enforcement as an afterthought. The policy lives in a wiki page. The wiki page is not a guardrail.
The fix is to treat tags as a schema with an owner, a version and tests, just like any other interface your platform exposes.
AWS tagging best practices (the ones AWS actually documents)
Before inventing conventions, know the hard limits. These come straight from the AWS tagging best practices and strategies page:
| Constraint | What AWS documents |
|---|---|
| Tags per resource | Up to 50 user-created tags; aws: system tags don't count |
| Key length | 1 to 128 Unicode characters |
| Value length | 0 to 256 Unicode characters |
| Uniqueness | Each key is unique per resource and has one value |
| Case | Keys and values are case sensitive |
| Reserved prefix | aws: tags are created by AWS; you can't edit or delete them |
| Characters | Varies by service; generally letters, numbers, spaces and _ . : / = + - @ |
And the practices worth tattooing on the platform team's forearm:
- No PII or secrets in tags. AWS is explicit that tags are visible to many services, including billing. A tag is metadata, not a vault.
- Pick one casing convention and stick to it. AWS's own naming suggestion is lowercase, hyphen-separated words, optionally prefixed with an org abbreviation and a colon (their example is
anycompany:cost-center). - Design tags for several jobs at once: cost allocation, access control, automation and plain organisation.
- Plan for change. Renaming a tag that IAM policies reference means updating those policies too.
- Start in monitor mode, then enforce. Clean up what exists before you start blocking deployments.
We'll use AWS's lowercase-hyphen convention for every example below. If your org already standardised on PascalCase, that's fine. Consistency beats taste.
→ Turn these conventions into a governance standard with the tagging governance best-practice guide
The six-tag baseline: a schema you can defend
More tags is not more strategy. Every required tag is a tax on every engineer who creates a resource, so each one must answer a question somebody actually asks.
| Tag key | Question it answers | Example values | Required? |
|---|---|---|---|
owner | Who gets paged or asked about this? | team-payments (a team, never a person) | Yes |
cost-center | Who pays for it? | cc-1001, cc-2040 | Yes |
environment | How careful should I be? | prod, staging, dev, sandbox | Yes |
application | Which system does it belong to? | checkout-api, data-lake | Yes |
data-classification | What's the blast radius if it leaks? | public, internal, confidential | Yes for data stores |
managed-by | Should I touch this in the console? | terraform, manual | Yes |
A few opinions, backed by scar tissue:
- Owners are teams, not people. People change jobs. Teams get renamed too, but at least the rename is a single change to an allowed-values list.
managed-byis the most underrated tag in AWS. It's how you spot hand-built resources at a glance, and it tells responders whether a console fix will be overwritten by the nextterraform apply.- Keep optional tags optional.
project,ticketandexpiry-dateare useful, but making them mandatory is how you getticket: n/aon 3,000 resources.
If you want to see where those owners and environments sit on the actual architecture, the cost allocation explainer walks through mapping spend to the boundaries reviewers care about.
→ Generate this baseline with your own keys and allowed values using the Tagging Policy Builder
AWS tag policy example: standardise keys and values
AWS Organizations tag policies define the acceptable capitalisation of a key, its allowed values and, optionally, which resource types to enforce against. Here's a policy for two of our baseline tags, written against the tag policy syntax:
{
"tags": {
"environment": {
"tag_key": {
"@@assign": "environment"
},
"tag_value": {
"@@assign": ["prod", "staging", "dev", "sandbox"]
}
},
"cost-center": {
"tag_key": {
"@@assign": "cost-center"
},
"tag_value": {
"@@assign": ["cc-*"]
}
}
}
}
What each part does:
tag_keysets the required capitalisation. Resources usingEnvironmentorENVIRONMENTshow up as noncompliant.tag_valuelists allowed values. You get one*wildcard per value, socc-*works but a pattern like*@*.comdoesn't.- No
enforced_foryet. That's deliberate. Without it, the policy reports noncompliance instead of blocking it. AWS warns thatenforced_forcan stop people from creating resources they need, so add it per service only after the reports are clean (for example"enforced_for": { "@@assign": ["secretsmanager:ALL_SUPPORTED"] }, and only for services on the supported-resources list).
Now the catch most teams learn the hard way: tag policies don't make a tag required. Untagged resources don't appear as noncompliant in tag policy results. A tag policy says "if you use this key, spell it right and pick a valid value". It never says "you must use this key".
How to enforce tags in AWS: three layers, not one
No single AWS feature does the whole job, so stack three.
Layer 1: Make the right thing the default (IaC)
Most resources should be born tagged because the pipeline tags them, not because an engineer remembered. That's what Terraform default_tags is for (more below).
Layer 2: Block the worst gaps (service control policies)
To stop resources from being created without a required tag, use an SCP with the aws:RequestTag condition key. AWS's own tagging strategy walkthrough on the Cloud Operations blog uses this pattern for EC2. Here's a version for our cost-center and owner keys:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "DenyRunInstancesWithoutCostCenter",
"Effect": "Deny",
"Action": "ec2:RunInstances",
"Resource": [
"arn:aws:ec2:*:*:instance/*",
"arn:aws:ec2:*:*:volume/*"
],
"Condition": {
"Null": { "aws:RequestTag/cost-center": "true" }
}
},
{
"Sid": "DenyRunInstancesWithoutOwner",
"Effect": "Deny",
"Action": "ec2:RunInstances",
"Resource": [
"arn:aws:ec2:*:*:instance/*",
"arn:aws:ec2:*:*:volume/*"
],
"Condition": {
"Null": { "aws:RequestTag/owner": "true" }
}
}
]
}
"Null": "true" means "the tag was not in the request", so the launch is denied. Two separate statements matter: putting both keys in one Null block would only deny when both are missing.
Keep this layer narrow. aws:RequestTag only works for actions that support tagging at creation, so check the Service Authorization Reference for each action before you write the deny, and test in a sandbox OU first. An overly broad deny is how you break someone's deployment on a Friday.
Layer 3: Catch everything else (detective checks)
The AWS Config managed rule required-tags (identifier REQUIRED_TAGS) flags resources missing up to six tag keys, with optional allowed values per key. Two documented limits to plan around:
- It's detective, not preventive. It reports bad tags after the resource exists.
- Config doesn't record tags for every resource type, so confirm tags appear in the configuration item for a type before you trust the rule for it.
Detective checks are also where hand-built resources surface. A resource created outside your pipeline is exactly the one most likely to be untagged.
→ See which resources were changed outside code, and by whom, with ClickOps Detection
Terraform default_tags: tag everything without nagging anyone
The AWS provider's default_tags block applies tags to every resource the provider manages. Per HashiCorp, it needs Terraform 0.12+ and AWS provider v3.38.0 or later.
variable "cost_center" {
type = string
}
provider "aws" {
region = "eu-west-1"
default_tags {
tags = {
"owner" = "team-payments"
"cost-center" = var.cost_center
"environment" = "prod"
"application" = "checkout-api"
"managed-by" = "terraform"
}
}
}
resource "aws_s3_bucket" "receipts" {
bucket = "acme-checkout-receipts-prod"
tags = {
"data-classification" = "confidential"
}
}
The bucket ends up with all five default tags plus its own data-classification tag. Things to know:
- Resource-level tags win. If a resource sets the same key in its own
tags, that value takes precedence over the default. - Modules inherit the defaults from the provider configuration they use, so one provider block covers a whole stack.
- Auto Scaling groups are the classic exception. HashiCorp's guidance is to keep the defaults in a variable and
merge()them into the group's own tag configuration so instances launched by the group get them too.
Pair default_tags with a validation rule on cost_center (for example a regex that matches your cc- prefix) and a typo fails at plan time instead of showing up in next month's bill.
Defaults only cover resources Terraform knows about, though. Anything created by hand, or changed after deploy, is invisible to them.
→ Spot where live infrastructure has drifted away from your Terraform with Drift Detector
AWS cost allocation tags: the step everyone forgets
Here's the plot twist that burns FinOps teams every quarter: tagging a resource doesn't put that tag in your bill.
User-defined tags must be activated as cost allocation tags in the Billing and Cost Management console (Cost allocation tags, select keys, Activate) or via the UpdateCostAllocationTagsStatus API. Per the AWS Billing docs:
- A new tag key can take up to 24 hours to appear on the cost allocation tags page.
- Activation itself can take up to another 24 hours.
- Activation is per key, so it covers every value of that key at once.
Practical moves:
- Activate your baseline keys (
owner,cost-center,environment,application) the day the schema is approved, not the day finance asks. - Don't promise historical breakdowns by a freshly activated tag until you've confirmed what your billing data actually shows.
- Review untagged spend as its own line item. If "no tag" is your biggest cost center, that's your backlog.
Once tagged spend shows up, you can reason about it per application and environment rather than per account.
→ Find addressable spend with evidence, not guesses, using Cost Optimizer
AWS tagging strategy review checklist
Use this in design reviews, landing zone reviews or your next Well-Architected review:
- Required keys are documented, versioned and owned by a named team
- One casing convention, encoded in a tag policy via
tag_key - Allowed values defined for
environment,data-classificationandmanaged-by -
ownervalues are teams, never individuals - No PII, secrets or credentials anywhere in tag keys or values
- Terraform providers use
default_tags; Auto Scaling groups handled explicitly - SCP denies creation without the two or three most critical tags, tested in a sandbox OU
- Tag policy ran in report-only mode before any
enforced_forwas added - AWS Config
required-tags(or equivalent) runs in every account and Region you use - Baseline keys activated as cost allocation tags
- Untagged and noncompliant resources reviewed on a fixed cadence with owners assigned
- IAM policies that reference tags are updated in the same change as any tag rename
Key takeaways
- An AWS tagging strategy is a schema: a handful of required keys, one casing rule, allowed values and an owner.
- AWS allows 50 user-created tags per resource, and keys and values are case sensitive. Casing discipline is not optional.
- Tag policies standardise spelling and values but don't require a tag to exist. Use SCPs with
aws:RequestTagfor that. - AWS Config
required-tagschecks up to six keys and is detective only. - Terraform
default_tagsshould do most of the tagging, with explicit handling for Auto Scaling groups. - Tags don't reach your bill until you activate them as cost allocation tags, which can take up to 48 hours end to end.
→ Build your tagging standard now with the free Tagging Policy Builder
FAQ
What is a good AWS tagging strategy?
A short list of required tags that each answer a real question (who owns this, what it costs, which environment it is, how sensitive its data is), one casing convention, a set of allowed values, and layered enforcement: tags applied by default in infrastructure as code, preventive guardrails for the most important keys, and detective checks for everything else.
How many tags can an AWS resource have?
AWS documents a maximum of 50 user-created tags per resource. Keys can be 1 to 128 Unicode characters and values 0 to 256. Tags with the reserved aws: prefix are created by AWS, can't be edited or deleted by you, and don't count against the 50-tag limit.
Do AWS tag policies prevent untagged resources?
No. Tag policies standardise which keys and values are acceptable, but they enforce a tag's accepted value, not its presence, and untagged resources don't show as noncompliant in tag policy results. Pair them with SCPs using aws:RequestTag to block untagged creation, and with detective checks such as the AWS Config REQUIRED_TAGS rule.
Why are my AWS tags not showing in Cost Explorer?
User-defined tags must be activated as cost allocation tags in the Billing and Cost Management console first. AWS documents that a new key can take up to 24 hours to appear on the cost allocation tags page, and up to another 24 hours to activate.
Are AWS tags case sensitive?
Yes. CostCenter, costcenter and COSTCENTER are three different keys. Pick one convention, document it, and let a tag policy define the required case so variants get reported as noncompliant.
→ Turn tagging rules into audit-ready control mappings with the Compliance Control Matrix Builder
Stop tagging in a spreadsheet, start governing the estate
A tagging strategy only works if you can see it: which resources follow the schema, which ones were built by hand, and where live infrastructure no longer matches the design. That's the gap between "we have a tagging policy" and "we have a governed AWS estate".
Draft the schema with the free builder, then bring your architecture, inventory and drift signals into one place so tags stop being a quarterly clean-up project.
→ Start free with Architecto and see your estate, ownership and IaC coverage in one view