Enforcing a Tagging Strategy as a Security Control
This lesson explains why a consistent, enforced tagging strategy is a security control as well as an operational one, since tags underpin grouping, automation, cost allocation and attribute-based access control.
Learning outcomes
After completing this lesson, you will be able to:
- Identify standard tags and their security uses.
- Explain how tag policies and SCPs enforce tags.
- Explain why the tags used for access control must be protected.
Standard tags
A tagging strategy defines a small set of standard tag keys that every resource carries, and several have security uses. Environment separates production from non-production, so stricter controls and monitoring can target production. Owner identifies who to contact when a finding involves the resource. DataClassification records how sensitive the data is, so access control, encryption requirements and monitoring can depend on it, for example through ABAC policies. CostCenter supports cost allocation. The following table summarises these tags.
| Tag | Security use |
|---|---|
Environment | Different controls for production and non-production |
Owner | Who to contact about a finding |
DataClassification | Access control, encryption and monitoring by sensitivity |
CostCenter | Cost allocation |
Standard tags and their security use
Enforcing tags
Tags support cost allocation, automation and attribute-based access control (ABAC), but they are useful only if they are present and consistent. Tags applied by convention alone drift quickly: keys are misspelt, values vary and some resources are not tagged at all. Enforcement therefore combines standardisation, prevention at creation and detection of resources that are still missing tags. The following list describes the mechanisms.
- Tag policies standardise keys and values.
- SCPs require tags at creation with
aws:RequestTagandaws:TagKeys. - AWS Config
required-tagsrules find resources without required tags.
Protecting access-control tags
When tags are used for ABAC, a tag is effectively a permission. If a developer can change the project tag on a resource, or the tag on their own role, they can grant themselves access to another project's resources. Policies must therefore deny TagResource and UntagResource for access-control tag keys, using the aws:TagKeys condition, except for administrators or during resource creation. Once those tags are protected, Resource Groups, Tag Editor, automation and access policies can rely on them safely.
The following diagram shows the allowed values of a data classification tag and how the tag is kept correct.

Tags used for access
Requiring a data classification tag
Macie and access policies rely on a DataClassification tag, but many buckets lack it or use inconsistent values. A tag policy standardises the values and rejects non-compliant ones:
{
"tags": {
"DataClassification": {
"tag_key": { "@@assign": "DataClassification" },
"tag_value": { "@@assign": ["public", "internal", "confidential", "restricted"] },
"enforced_for": { "@@assign": ["s3:bucket"] }
}
}
}An AWS Config required-tags rule lists existing buckets without the tag for their owners to fix. Only the security team's role may change the tag afterwards, because access policies and monitoring depend on it.
How can a tag be required when resources are created?
Show answer
With an SCP that denies creation unless aws:RequestTag includes it.
Exam Tips
Remember for the exam
- To standardise tag keys and values across the organisation, use tag policies.
- Require tags at creation with an SCP on aws:RequestTag.
- Find untagged resources with the Config required-tags rule.
- Tags used for ABAC must be protected from changes.
- A DataClassification tag supports access control and monitoring by sensitivity.