🔐 Option 1: IAM Policy with Tag Condition Keys
Use condition keys in IAM policies to require specific tags at resource creation.
📌 Example: Enforce Application
and Environment
Tags
-
✅ Denies creation unless BOTH
Application=MyApp
andEnvironment=prod
are specified in the request.
💡 Add Another Statement to Allow Other Actions:
You can scope this to specific services or use this only in conjunction with other specific permissions.
✅ Option 2: Service Control Policies (SCP) (For AWS Organizations)
If you're using AWS Organizations, use an SCP to block untagged resource creation across accounts.
📌 Example SCP:
-
Denies if the
Environment
orApplication
tag is missing (null).
Bonus: Allow tagging only certain values
Summary Table
Feature | IAM Policy | SCP (Organizations) |
---|---|---|
Scope | Per user/group/role | Entire OU/account |
Good For | Fine-grained control | Enforcing org-wide standards |
Tag enforcement supported? | ✅ Yes | ✅ Yes |
Works on all services? | Only services supporting tags | Same |
No comments:
Post a Comment