[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AD9G5QHBKTCMEF0F1G8BFV":3,"skill-same:01M7AD9G5QHBKTCMEF0F1G8BFV":147},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":46,"repositoryHtmlUrl":47,"repositoryHomepageUrl":6,"ownerHtmlUrl":48,"ownerBlogUrl":6,"ownerDescription":49,"updatedAt":50,"install":51,"resources":64},"01M7AD9G5QHBKTCMEF0F1G8BFV","tag-governance-automator",null,"Designs and implements AWS tag governance automation across Organizations TagPolicy JSON (allowed_values, case_sensitive, enforced_for cascade), EventBridge + Lambda auto-tagging on EC2\u002FS3\u002FLambda creation (derive Owner from IAM identity, Environment from account map), Resource Groups Tagging API bulk operations (tag-resources, untag-resources, get-resources multi-region), Config required-tags managed rule + Security Hub finding aggregation, cost-allocation-tag activation via Billing API (user-defined vs AWS-generated), and ABAC IAM policy design with aws:ResourceTag and aws:PrincipalTag condition keys. Covers automated remediation: Config detects missing tag, SSM Automation adds tag, Config re-evaluates. Emits AUTOMATED with tag policy template or MANUAL_STEP_REQUIRED with the specific gap. Use when building tag governance, auto-tagging pipelines, ABAC, or tag-compliance automation.","jhkchan\u002Faws-agent-skills","jhkchan","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1083902?v=4","01M7A2SVQYP9GQTPTDXP5JKYQ4","Jacky Chan","01M7A2SVS117YWCTZABB75HZR1",4,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Ftag-governance-automator\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: tag-governance-automator\ndescription: 'Designs and implements AWS tag governance automation across Organizations TagPolicy JSON (allowed_values, case_sensitive, enforced_for cascade), EventBridge + Lambda auto-tagging on EC2\u002FS3\u002FLambda creation (derive Owner from IAM identity, Environment from account map), Resource Groups Tagging API bulk operations (tag-resources, untag-resources, get-resources multi-region), Config required-tags managed rule + Security Hub finding aggregation, cost-allocation-tag activation via Billing API (user-defined vs AWS-generated), and ABAC IAM policy design with aws:ResourceTag and aws:PrincipalTag condition keys. Covers automated remediation: Config detects missing tag, SSM Automation adds tag, Config re-evaluates. Emits AUTOMATED with tag policy template or MANUAL_STEP_REQUIRED with the specific gap. Use when building tag governance, auto-tagging pipelines, ABAC, or tag-compliance automation.'\nlicense: Apache-2.0\ncompatibility: Agent runtime that reads SKILL.md (Claude Code, Cursor, Windsurf, Codex, Gemini). No AWS CLI required for offline policy design. Live deployment uses aws organizations enable-policy-type, create-policy, update-policy, aws resourcegroupstaggingapi tag-resources, untag-resources, get-resources, aws configservice put-config-rule, describe-config-rules, aws ce update-cost-allocation-tags-status, aws ssm create-document, start-automation-execution, and aws lambda create-function with an...\nmetadata:\n  domain: aws-cloudops\n  complexity: high\n  requires_llm: 'true'\n  phase: '4'\n  supports_pipeline: 'true'\n  entry_point: 'false'\n  family: Governance\n  task_type: automate\n  skill_class: capability\n  lifecycle_status: active\n  verdict_shape: AUTOMATED | MANUAL_STEP_REQUIRED\n  when_to_use: Designing Organizations tag policies (allowed_values, case sensitivity, enforced_for), building EventBridge + Lambda auto-tagging pipelines, running Resource Groups Tagging API bulk operations across regions, wiring Config required-tags rules with Security Hub findings, activating cost allocation tags, designing ABAC IAM policies with aws:ResourceTag \u002F aws:PrincipalTag conditions, or remediating untagged resources via Config + SSM Automation.\n  activation_triggers: design Organizations TagPolicy, allowed_values enforced_for, auto-tag on creation EventBridge Lambda, Resource Groups Tagging API bulk, tag-resources untag-resources, required-tags Config rule, cost allocation tag activation, ABAC IAM policy ResourceTag, tag compliance remediation, Security Hub tag finding, tag governance baseline\n  invocation_schema: 'Input: either (a) a tag governance requirement (\"enforce Environment and CostCenter tags on all EC2 and S3 resources\", \"auto-tag Owner on EC2 creation\", \"design ABAC policy for team-scoped access\"), OR (b) an existing tag policy \u002F Config rule \u002F EventBridge rule to audit and harden. Output: deterministic GOVERNANCE block per requirement — STRATEGY\u002FPOLICY\u002FAUTOMATION\u002FCOMPLIANCE\u002FVERDICT — where VERDICT is AUTOMATED (tag policy template ready) or MANUAL_STEP_REQUIRED (specific gap cited, e.g., Billing console activation that cannot be API-driven).'\n  version: 0.1.0\n  author: Jacky Chan — AWS Community Builder\n  keywords: AWS Organizations, Tag Policy, TagPolicy, allowed_values, enforced_for, Resource Groups Tagging API, tag-resources, untag-resources, AWS Config, required-tags, Security Hub, EventBridge, Lambda auto-tagging, cost allocation tags, ABAC, aws:ResourceTag, aws:PrincipalTag, aws:RequestTag, SSM Automation, tag compliance, tag governance\n  tags: aws-organizations, tag-policy, resource-groups-tagging-api, aws-config, security-hub, abac, eventbridge, lambda, automate\n---\n\n# Tag Governance Automator\n\n## Mindset\n\n**One-line takeaway:** tag governance is a three-layer stack — **define**\n(Organizations TagPolicy sets the rules) → **enforce** (EventBridge +\nLambda auto-tags on creation; Config required-tags detects violations) →\n**remediate** (SSM Automation or Lambda adds missing tags; Config\nre-evaluates and flips COMPLIANT). A gap in ANY layer produces a silent\nfailure: the policy is published but never enforced, resources are tagged\ninconsistently, cost allocation reports are wrong, and ABAC policies\nsilently over-permit or under-permit.\n\n- **Organizations TagPolicy** without `enforced_for` is advisory only:\n  the policy says Environment must be `prod` or `dev`, but if no resource\n  type is listed under `enforced_for`, AWS does not block non-compliant\n  tag operations. The policy is documentation, not enforcement.\n- **Auto-tagging** without a **tag policy** produces drift: the Lambda\n  stamps tags on creation, but nothing stops a human from changing them\n  afterward. Always pair auto-tagging with a tag policy that prevents\n  unauthorized modifications.\n- **Cost allocation tags are NOT active by default.** A perfectly tagged\n  fleet produces zero cost-dimension data in CUR \u002F Cost Explorer until\n  an administrator activates the tag keys in Billing. This is the #1\n  \"we tagged everything and Cost Explorer is still empty\" issue.\n\n## Quick navigation\n\n| You want to... | Go to |\n|---|---|\n| Define required vs optional tag keys | Step 1 (tag strategy table) |\n| Author Organizations TagPolicy JSON | Step 2 + Appendix A |\n| Build EventBridge + Lambda auto-tagging | Step 3 + reference auto-tagging-eventbridge-lambda.md |\n| Bulk tag\u002Funtag across regions via Tagging API | Step 4 |\n| Wire Config `required-tags` rule | Step 5 |\n| Route tag findings to Security Hub | Step 6 |\n| Remediate missing tags automatically (Config → SSM → Config) | Step 7 |\n| Activate cost allocation tags | Step 8 |\n| Design ABAC IAM policies (aws:ResourceTag \u002F aws:PrincipalTag) | Step 9 |\n| Verify and audit a deployed governance baseline | Step 10 |\n| Avoid common tag-policy and ABAC pitfalls | Anti-Patterns |\n| Recent features (TagPolicy ABAC, CE tag-status API) | Recent AWS features |\n\n## Critical rules at a glance (do NOT bury these)\n\n1. **`enforced_for` is what makes a tag policy enforce.** Without it,\n   the policy defines allowed values but AWS does not block non-compliant\n   `CreateTags` \u002F `PutBucketTagging` \u002F `TagResource` calls. A policy\n   with `allowed_values` but no `enforced_for` is a recommendation, not\n   a guardrail. Always list the resource types explicitly.\n2. **Organizations TagPolicy `allowed_values` matching is case-insensitive\n   by default.** Set `tag_key.case_sensitive: true` if your downstream\n   systems (CUR, ABAC conditions) depend on exact casing. A mismatch\n   between the policy's case sensitivity and your IAM `StringEquals`\n   conditions produces silent ABAC over-grants.\n3. **Tag policies cascade: org root → OU → account → resource.** A\n   child policy does NOT override the parent — it is additive (union of\n   constraints). You cannot relax a parent's `allowed_values` at the\n   child level. If the root says Environment is `prod|dev`, an OU\n   cannot add `staging` without editing the root policy.\n4. **Cost allocation tags require explicit activation in Billing.**\n   Tagging a resource does NOT make the tag appear in Cost Explorer or\n   the Cost and Usage Report (CUR). An administrator must activate each\n   tag key via the Billing console or `ce update-cost-allocation-tags-status`.\n   Activation takes up to 24 hours to propagate.\n5. **ABAC condition keys are case-sensitive at the IAM evaluation layer.**\n   `aws:ResourceTag\u002FEnvironment` with `StringEquals: \"prod\"` does NOT\n   match a resource tagged `Prod`. If your tag policy allows\n   case-insensitive values but your IAM condition uses `StringEquals`,\n   you have a silent gap. Use `StringEqualsIgnoreCase` for ABAC\n   conditions OR enforce case sensitivity in the tag policy.\n\n## Pre-flight: data requirements\n\nDesigning a tag governance baseline requires these inputs:\n\n| Input | Source | Why |\n|---|---|---|\n| Organization ID + root ID | `aws organizations describe-organization` | Tag policy scope |\n| Existing tag policies | `aws organizations list-policies --filter TAG_POLICY` | Don't overwrite blindly |\n| OU structure | `aws organizations list-organizational-units-for-parent` | Where to attach policies |\n| Account → environment mapping | Internal CMDB or account tags | Drives `Environment` allowed_values |\n| Config recorder status | `aws configservice describe-configuration-recorders` | Required-tags rule needs recorder |\n| Existing Config rules | `aws configservice describe-config-rules` | Avoid duplicate required-tags rules |\n| Security Hub enablement | `aws securityhub describe-hub` | Finding aggregation target |\n| Sample resource inventory | `aws resourcegroupstaggingapi get-resources` | Baseline current tag coverage |\n| IAM principal tags (for ABAC) | `aws iam list-user-tags` \u002F `list-role-tags` | ABAC source attributes |\n\n**If the input is malformed** (missing org ID, ambiguous scope), emit:\n\n```text\nGOVERNANCE: \u003Creference>\nVERDICT: ERROR\nREASON: Cannot design tag governance — Organizations root ID and target scope (resource types + accounts) are required.\nGAP: Re-supply describe-organization output and the list of resource types to enforce tagging on.\n```\n\n## Process — Workflow design (apply in order)\n\n### Step 0: Expert knowledge — non-obvious TagPolicy + tagging behaviors\n\n> Moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md#step-0-expert-knowledge--non-obvious-tagpolicy--tagging-behaviors).\n> Ten expert behaviors: enforcement only on enforced_for types, service:resource-type notation typos silently disable enforcement, policies block but never retro-fix, tag-resources is not atomic (check FailedResourcesMap), get-resources is region-scoped, required-tags max 5 keys, cost-tag activation is per-account, aws:PrincipalTag resolves at session creation, aws:RequestTag is create\u002Ftag-only, per-type tagging APIs need branching runbooks, system tags are not enforced.\n\n### Step 1: Define the tag strategy framework\n\nEvery governance engagement starts with a canonical tag key set.\nDefault to this baseline and adjust per organizational requirements:\n\n| Tag key | Category | Required? | Allowed values (example) | Purpose |\n|---|---|---|---|---|\n| `Environment` | Required | Yes | `dev`, `staging`, `prod` | ABAC, cost split, blast-radius scoping |\n| `Owner` | Required | Yes | email or team alias (free-form) | Accountability, alert routing |\n| `Project` | Required | Yes | project code (free-form) | Cost allocation |\n| `CostCenter` | Required | Yes | `cc-1001`, `cc-1002`, ... | Finance reporting |\n| `Application` | Required | Yes | app name (free-form) | Grouping, dependency mapping |\n| `Backup:Required` | Optional | No | `true`, `false` | Backup policy routing |\n| `ComplianceTier` | Optional | No | `tier-1`, `tier-2`, `tier-3` | Audit cadence, SOC scope |\n| `DataClassification` | Optional | No | `public`, `internal`, `confidential` | Macie, KMS routing |\n\n**Decision rules:**\n- Never exceed 10 required tags — operational friction kills adoption.\n- Free-form tags (`Owner`, `Project`) are acceptable for the FIRST pass;\n  tighten to allowed_values once the set stabilizes.\n- Map each tag key to a downstream consumer (Cost Explorer, ABAC, Config,\n  Macie). A tag no consumer reads is dead weight.\n\n### Step 2: Author the Organizations TagPolicy JSON\n\n> Moved to [references\u002Forganizations-tag-policies.md](references\u002Forganizations-tag-policies.md#step-2-author-the-organizations-tagpolicy-json-moved-from-skillmd).\n> Full recipe: enable-policy-type, the canonical baseline TagPolicy JSON (Environment\u002FCostCenter\u002FOwner\u002FProject with case_sensitive + allowed_values + enforced_for), create-policy, attach to root\u002FOU, negative-test enforcement, and the common-errors table (TagPolicyViolationException, silent no-enforcement, additive child limits, PolicyTypeNotEnabledException).\n\n### Step 3: Build EventBridge + Lambda auto-tagging\n\n> Moved to [references\u002Fauto-tagging-eventbridge-lambda.md](references\u002Fauto-tagging-eventbridge-lambda.md#step-3-build-eventbridge--lambda-auto-tagging-moved-from-skillmd).\n> Full recipe: CloudTrail → EventBridge rule (EC2 RunInstances; S3 CreateBucket + Lambda CreateFunction) → the multi-service Python handler with account→Environment mapping, plus the Lambda execution-role permissions and the EventBridge-vs-SSM trade-off table.\n\n### Step 4: Resource Groups Tagging API bulk operations\n\n> Moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md#step-4-resource-groups-tagging-api-bulk-operations).\n> Bulk tag\u002Funtag, multi-region get-resources iteration, get-tag-keys\u002Fvalues, FailedResourcesMap discipline, and the Tag Editor console alternative (manual-only, never the primary mechanism).\n\n### Step 5: Wire Config `required-tags` managed rule\n\n> Moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md#step-5-wire-config-required-tags-managed-rule).\n> required-tags-core put-config-rule CLI (5 keys, 4 resource types), the required-tags-ext second rule for 6+ keys, and describe\u002Fget-compliance verification.\n\n### Step 6: Security Hub integration\n\n> Moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md#step-6-security-hub-integration).\n> FSBP tag controls ([EC2.26]\u002F[S3.10]\u002F[Lambda.3]), enable-security-hub, describe-standards-controls tag query, and the batch-import-findings custom-finding payload.\n\n### Step 7: Automated remediation (Config → SSM → Config re-evaluate)\n\n> Moved to [references\u002Fworked-examples.md](references\u002Fworked-examples.md#step-7-automated-remediation-config--ssm--config-re-evaluate).\n> Pattern A: the Custom-AddRequiredTagsEC2 SSM Automation YAML + put-remediation-configurations wiring (Automatic: false); Pattern B: EventBridge on Config NON_COMPLIANT → Lambda; placeholder remediation requires a human-correction queue.\n\n### Step 8: Activate cost allocation tags\n\nCost allocation tags do NOT appear in Cost Explorer or CUR until\nactivated. Two activation paths:\n\n**Path A — API (preferred for automation):**\n\n```bash\naws ce update-cost-allocation-tags-status \\\n  --cost-allocation-tags-status \\\n    '[{\"TagKey\":\"Environment\",\"Status\":\"Active\"},\n      {\"TagKey\":\"Owner\",\"Status\":\"Active\"},\n      {\"TagKey\":\"Project\",\"Status\":\"Active\"},\n      {\"TagKey\":\"CostCenter\",\"Status\":\"Active\"}]'\n```\n\nVerify:\n\n```bash\naws ce list-cost-allocation-tags \\\n  --status Active\n```\n\n**Path B — Billing console (fallback):**\n\n```\nBilling console → Cost Allocation Tags → user-defined cost allocation tags\n→ Activate each tag key.\n```\n\n**User-defined vs AWS-generated tags:**\n\n| Tag source | Examples | Activation |\n|---|---|---|\n| User-defined | `Owner`, `Environment`, `Project` | Must be activated manually |\n| AWS-generated | `aws:createdBy`, `aws:cloudformation:stack-name` | `aws:createdBy` is auto-active; others must be activated |\n\n**Org payer vs member accounts:** in a consolidated billing family,\nactivate tags on the payer account. The payer's cost allocation tag\nsettings apply to the consolidated CUR. Member-account-specific tags\nrequire per-member activation for member-account-local reporting.\n\nIf the account does NOT support `ce update-cost-allocation-tags-status`\n(legacy accounts or restricted IAM), the activation is a MANUAL step.\nFlag `MANUAL_STEP_REQUIRED` with the Billing-console path.\n\n### Step 9: ABAC IAM policy design\n\nAttribute-based access control uses resource and principal tags in IAM\ncondition keys to make access decisions. ABAC scales better than RBAC\nfor large orgs because new resources and principals inherit access from\ntheir tags — no policy edit needed.\n\n**ABAC condition keys:**\n\n| Condition key | Source | When evaluated |\n|---|---|---|\n| `aws:ResourceTag\u002F\u003Ckey>` | Resource tags | On every API call against the resource |\n| `aws:PrincipalTag\u002F\u003Ckey>` | IAM user\u002Frole session tags | At session creation (fixed for session lifetime) |\n| `aws:RequestTag\u002F\u003Ckey>` | Tags in the API request | On create \u002F tag operations only |\n| `aws:TagKeys` | List of tag keys in request | On tag operations |\n\n**ABAC policy pattern (team-scoped S3 access):**\n\n\n> Policy JSON moved to [references\u002Fworked-examples.md](references\u002Fworked-examples.md#abac-policy-pattern--team-scoped-s3-access-moved-from-skillmd).\n> Two statements: team-tag-gated object actions on team-data-* plus CreateBucket with aws:RequestTag\u002FTeam and ForAllValues aws:TagKeys allow-list.\n\n**ABAC prerequisites checklist:**\n1. IAM principals (users \u002F roles) are tagged with the attribute (e.g., `Team`).\n2. Resources are tagged with the same attribute.\n3. The IAM policy uses `aws:ResourceTag` matching `aws:PrincipalTag`.\n4. The tag policy (Step 2) enforces that the attribute tag key exists on\n   new resources (otherwise ABAC silently breaks for new resources).\n5. Session tags are passed on `AssumeRole` via `--tags` or STS session\n   tagging.\n\n**Common ABAC pitfall:** `StringEquals` is case-sensitive. If your tag\npolicy allows `case_sensitive: false` for `Environment`, but your IAM\ncondition is `StringEquals: {\"aws:ResourceTag\u002FEnvironment\": \"prod\"}`,\na resource tagged `Prod` fails the check. Either enforce\n`case_sensitive: true` in the tag policy OR use\n`StringEqualsIgnoreCase` in the IAM condition.\n\n### Step 10: Audit and verify a deployed governance baseline\n\n> Moved to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md#step-10-audit-and-verify-a-deployed-governance-baseline).\n> Six verification groups: tag policy attached\u002Fenforced, Config rule evaluating, auto-tagger Lambda firing, Security Hub findings, active cost allocation tags, resource tag coverage — plus the \"passes 1-3 but zero cost tags = incomplete\" rule.\n\n## STRICT output contract\n\nEvery output MUST follow this exact structure. Deviations are bugs in\nthe skill.\n\n```text\nGOVERNANCE: \u003Creference>\nSCOPE: \u003Caccounts \u002F OUs \u002F regions covered>\nSTRATEGY:\n  - Required tags: \u003Ccomma-separated keys>\n  - Optional tags: \u003Ccomma-separated keys or \"none\">\n  - Enforcement layer: \u003COrganizations TagPolicy | Config rule | both>\nPOLICY:\n  - Type: \u003COrganizations TagPolicy | Config required-tags | EventBridge auto-tagger | ABAC IAM | conformance pack>\n  - Attached to: \u003Croot | OU | account | resource>\n  - Template: \u003Cinline JSON\u002FYAML or \"see Step N\">\nAUTOMATION:\n  - Auto-tagging: \u003CEventBridge + Lambda | none>\n  - Remediation: \u003CSSM Automation | Lambda | none>\n  - Trigger: \u003Cautomatic | manual>\nCOMPLIANCE:\n  - Detection: \u003CConfig rule name(s)>\n  - Reporting: \u003CSecurity Hub | Config dashboard | both>\n  - Cost allocation: \u003Cactive | inactive | pending>\nVERDICT: AUTOMATED | MANUAL_STEP_REQUIRED\nGAP: \u003Cif MANUAL_STEP_REQUIRED, the specific missing piece>\nTEMPLATE: \u003Cfull CLI snippet or policy JSON>\n```\n\n### Worked example — AUTOMATED, full tag governance baseline\n\n```text\nGOVERNANCE: org-tag-baseline\nSCOPE: org root r-xxxx, all member accounts, us-east-1 + us-west-2\nSTRATEGY:\n  - Required tags: Environment, Owner, Project, CostCenter, Application\n  - Optional tags: Backup:Required, ComplianceTier, DataClassification\n  - Enforcement layer: Organizations TagPolicy + Config required-tags rule\nPOLICY:\n  - Type: Organizations TagPolicy + Config required-tags-core\n  - Attached to: root (policy), Config recorder (rule)\n  - Template: see Step 2 (TagPolicy JSON) + Step 5 (Config rule)\nAUTOMATION:\n  - Auto-tagging: EventBridge + Lambda on RunInstances, CreateBucket, CreateFunction\n  - Remediation: SSM Automation Custom-AddRequiredTagsEC2 (manual trigger, placeholder values)\n  - Trigger: manual (placeholder remediation requires human correction)\nCOMPLIANCE:\n  - Detection: required-tags-core, required-tags-ext\n  - Reporting: Security Hub FSBP controls + Config compliance dashboard\n  - Cost allocation: active (Environment, Owner, Project, CostCenter via ce API)\nVERDICT: AUTOMATED\nGAP: None\nTEMPLATE:\n  aws organizations create-policy --type TAG_POLICY --name baseline-tag-policy --content file:\u002F\u002Ftag-policy.json\n  aws configservice put-config-rule --config-rule '{\"ConfigRuleName\":\"required-tags-core\",\"Source\":{\"Owner\":\"AWS\",\"SourceIdentifier\":\"REQUIRED_TAGS\"},\"Scope\":{\"ComplianceResourceTypes\":[\"AWS::EC2::Instance\",\"AWS::S3::Bucket\",\"AWS::Lambda::Function\",\"AWS::RDS::DBInstance\"]},\"InputParameters\":\"{\\\"tag1Key\\\":\\\"Environment\\\",\\\"tag2Key\\\":\\\"Owner\\\",\\\"tag3Key\\\":\\\"Project\\\",\\\"tag4Key\\\":\\\"CostCenter\\\",\\\"tag5Key\\\":\\\"Application\\\"}\"}'\n  aws ce update-cost-allocation-tags-status --cost-allocation-tags-status '[{\"TagKey\":\"Environment\",\"Status\":\"Active\"},{\"TagKey\":\"Owner\",\"Status\":\"Active\"},{\"TagKey\":\"Project\",\"Status\":\"Active\"},{\"TagKey\":\"CostCenter\",\"Status\":\"Active\"}]'\n```\n\n### Worked example — MANUAL_STEP_REQUIRED, cost allocation activation on legacy account\n\n> Moved to [references\u002Fworked-examples.md](references\u002Fworked-examples.md#worked-example--manual_step_required-cost-allocation-activation-on-legacy-account).\n> Full MANUAL_STEP_REQUIRED report: legacy payer blocks ce update-cost-allocation-tags-status; Billing-console path + 24h propagation.\n\n## Anti-Patterns — NEVER do these things\n\n- NEVER publish a TagPolicy without `enforced_for`. The policy with\n  `allowed_values` but no `enforced_for` is advisory — AWS does not\n  block non-compliant operations. Operators assume enforcement and\n  drift accumulates silently.\n\n- NEVER assume tag policy child policies can override the parent. They\n  cannot. Child OU and account policies are additive (union). To relax\n  a parent's `allowed_values`, edit the parent. A common mistake is\n  attaching a child policy with `allowed_values: [\"staging\"]` and\n  assuming it merges with the parent's `[\"dev\", \"prod\"]` — it does\n  not. The child can only further restrict.\n\n- NEVER use `StringEquals` for ABAC conditions when the tag policy has\n  `case_sensitive: false`. The case-insensitive tag policy allows\n  `Prod` and `prod`; the IAM condition matches only `prod`. This\n  produces silent under-grants (legitimate access denied) OR\n  over-grants (a `Deny` with `StringNotEquals` silently passes). Use\n  `StringEqualsIgnoreCase` for ABAC conditions OR enforce\n  `case_sensitive: true` in the tag policy.\n\n- NEVER assume cost allocation tags are active by default. They are\n  NOT. A fully tagged fleet with zero activated tag keys produces\n  zero cost-dimension data in Cost Explorer and CUR. Always verify\n  with `ce list-cost-allocation-tags --status Active`.\n\n- NEVER deploy a single Config `required-tags` rule for more than 5\n  tag keys. The managed rule silently ignores keys beyond the 5th\n  (`tag6Key`...`tag7Key` are not accepted parameters). Deploy multiple\n  required-tags rules (e.g., `required-tags-core`, `required-tags-ext`).\n\n- NEVER assume `resourcegroupstaggingapi get-resources` returns global\n  results. It is region-scoped. Querying only `us-east-1` misses\n  resources in other regions. Iterate over all enabled regions.\n\n- NEVER ignore `FailedResourcesMap` in a `tag-resources` response. A\n  non-empty map means some resources were not tagged. The API call\n  \"succeeded\" but the tagging is partial. Log, retry, and alert on\n  persistent failures.\n\n- NEVER wire auto-tagging without a tag policy. The Lambda stamps\n  tags on creation, but nothing stops a human from modifying them\n  afterward. Pair auto-tagging with a TagPolicy that enforces\n  `allowed_values` on the same keys.\n\n- NEVER set `Automatic: true` on placeholder-tag remediation (e.g.,\n  `Environment: unknown`) without a downstream human-correction queue.\n  The placeholder satisfies the Config rule but pollutes ABAC and\n  cost reporting. Always flag placeholder remediation as a secondary\n  manual step.\n\n- NEVER use `aws:RequestTag` in a policy governing read operations\n  (`s3:GetObject`, `ec2:DescribeInstances`). `aws:RequestTag` is only\n  present on create \u002F tag API calls. A `Deny` with `aws:RequestTag`\n  on a read operation silently never matches.\n\n- NEVER assume IAM principal tags propagate to existing sessions.\n  `aws:PrincipalTag` is resolved at session creation. Changing a\n  user's `Team` tag does not affect active sessions until they\n  re-authenticate. Coordinate tag changes with session refresh.\n\n- NEVER forget that Organizations TagPolicy does NOT enforce on\n  AWS-generated tags (`aws:cloudformation:stack-name`,\n  `aws:createdBy`). These are system tags. User-defined policies apply\n  only to user-supplied keys. If your ABAC depends on `aws:createdBy`,\n  there is no enforcement lever — it is always present but read-only.\n\n- NEVER deploy ABAC without tagging the IAM principals first. An ABAC\n  policy using `aws:PrincipalTag\u002FTeam` on an untagged role silently\n  denies all access (empty string does not match). Verify principal\n  tags with `iam list-user-tags` \u002F `list-role-tags` before deploying\n  the policy.\n\n- NEVER bulk-tag resources across accounts without assuming a role in\n  each target account. The Tagging API operates within the caller's\n  account. A cross-account bulk-tag script requires `sts:AssumeRole`\n  into each member account.\n\n## Pre-flight safety checks (run before applying any tag governance CLI)\n\n> Moved to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md#pre-flight-safety-checks-run-before-applying-any-tag-governance-cli).\n> Gates: CONFIRM prompt, back up the tag policy (no version history), sandbox-OU test before root, payer API support check, inventory principal tags before ABAC.\n\n## Appendix A — Canonical tag key reference\n\n> Moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md#appendix-a--canonical-tag-key-reference).\n> 12-row canonical key table: required (Environment\u002FOwner\u002FProject\u002FCostCenter\u002FApplication\u002FTeam), optional (Backup:Required\u002FComplianceTier\u002FDataClassification), auto (CreatedAt\u002FCreatorARN\u002FCreatedVia) with consumers.\n\n## Appendix B — Decision tree (which enforcement layer)\n\n```\nIs the requirement to PREVENT non-compliant tags at creation?\n├─ Yes → Organizations TagPolicy with enforced_for (Step 2)\n│         (blocks the API call; does not fix existing resources)\n│\n└─ No → Is the requirement to DETECT and REPORT missing tags?\n        ├─ Yes → Config required-tags rule (Step 5) + Security Hub (Step 6)\n        │\n        └─ No → Is the requirement to AUTO-STAMP tags on creation?\n                ├─ Yes → EventBridge + Lambda auto-tagger (Step 3)\n                │\n                └─ No → Is the requirement to REMEDIATE existing untagged resources?\n                        ├─ Yes → Config → SSM Automation \u002F Lambda remediation (Step 7)\n                        │\n                        └─ No → Is the requirement to USE tags for access decisions?\n                                ├─ Yes → ABAC IAM policy (Step 9)\n                                │\n                                └─ No → Is the requirement for COST REPORTING?\n                                        ├─ Yes → Cost allocation tag activation (Step 8)\n                                        │\n                                        └─ Default: tag strategy framework (Step 1)\n```\n\n## Recent AWS features (2024-2026)\n\n> Moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md#recent-aws-features-2024-2026).\n> TagPolicy ABAC integration, ce update-cost-allocation-tags-status GA, Tagging API pagination lifts, multi required-tags rules, custom Security Hub findings, EventBridge cross-account routing, STS session tagging.\n\n## Expert heuristic: tag governance blast radius\n\n> Moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md#expert-heuristic-tag-governance-blast-radius).\n> Non-negotiable: sandbox-OU test before root; includes the why (fleet-wide CreateTags outage), five scoping techniques, the 3-phase DETECT→sandbox-ENFORCE→root-ENFORCE rollout, cost-tag and ABAC blast radius, and BLAST_RADIUS\u002FVALIDATION_PHASE output fields.\n\n\n## References (load on demand)\n\n- [advanced-patterns](references\u002Fadvanced-patterns.md) — Step 0 expert knowledge, Step 4 Tagging API bulk ops, Step 5 Config rule, Step 6 Security Hub, Appendix A key reference, Recent AWS features, and the blast-radius expert heuristic moved from SKILL.md\n- [worked-examples](references\u002Fworked-examples.md) — Step 7 remediation recipes (SSM YAML + wiring + Pattern B), the ABAC policy JSON, and the MANUAL_STEP_REQUIRED worked example moved from SKILL.md\n- [diagnostic-commands](references\u002Fdiagnostic-commands.md) — Step 10 baseline audit commands and the pre-flight safety checks moved from SKILL.md\n- [organizations-tag-policies](references\u002Forganizations-tag-policies.md) — now also holds the full Step 2 TagPolicy authoring recipe moved from SKILL.md\n- [auto-tagging-eventbridge-lambda](references\u002Fauto-tagging-eventbridge-lambda.md) — now also holds the full Step 3 EventBridge + Lambda auto-tagging recipe moved from SKILL.md\n\n## Domain\n\nAWS CloudOps \u002F Governance Automation — Tag governance, ABAC, cost\nallocation.\n\n## AWS documentation\n\n- **Organizations Tag Policies** — https:\u002F\u002Fdocs.aws.amazon.com\u002Forganizations\u002Flatest\u002Fuserguide\u002Forgs_manage_policies_tag-policies.html\n- **Resource Groups Tagging API** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fresourcegroupstagging\u002Flatest\u002FAPIReference\u002Foverview.html\n- **AWS Config required-tags Rule** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fconfig\u002Flatest\u002Fdeveloperguide\u002Frequired-tags.html\n- **ABAC for AWS** — https:\u002F\u002Fdocs.aws.amazon.com\u002FIAM\u002Flatest\u002FUserGuide\u002Fintroduction_attribute-based-access-control.html\n- **Cost Allocation Tags** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fawsaccountbilling\u002Flatest\u002Faboutv2\u002Fcost-alloc-tags.html\n- **Security Hub Foundational Security Best Practices** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fsecurityhub\u002Flatest\u002Fuserguide\u002Ffsbp-standard.html\n","# Tag Governance Automator\n\n## Mindset\n\n**One-line takeaway:** tag governance is a three-layer stack — **define**\n(Organizations TagPolicy sets the rules) → **enforce** (EventBridge +\nLambda auto-tags on creation; Config required-tags detects violations) →\n**remediate** (SSM Automation or Lambda adds missing tags; Config\nre-evaluates and flips COMPLIANT). A gap in ANY layer produces a silent\nfailure: the policy is published but never enforced, resources are tagged\ninconsistently, cost allocation reports are wrong, and ABAC policies\nsilently over-permit or under-permit.\n\n- **Organizations TagPolicy** without `enforced_for` is advisory only:\n  the policy says Environment must be `prod` or `dev`, but if no resource\n  type is listed under `enforced_for`, AWS does not block non-compliant\n  tag operations. The policy is documentation, not enforcement.\n- **Auto-tagging** without a **tag policy** produces drift: the Lambda\n  stamps tags on creation, but nothing stops a human from changing them\n  afterward. Always pair auto-tagging with a tag policy that prevents\n  unauthorized modifications.\n- **Cost allocation tags are NOT active by default.** A perfectly tagged\n  fleet produces zero cost-dimension data in CUR \u002F Cost Explorer until\n  an administrator activates the tag keys in Billing. This is the #1\n  \"we tagged everything and Cost Explorer is still empty\" issue.\n\n## Quick navigation\n\n| You want to... | Go to |\n|---|---|\n| Define required vs optional tag keys | Step 1 (tag strategy table) |\n| Author Organizations TagPolicy JSON | Step 2 + Appendix A |\n| Build EventBridge + Lambda auto-tagging | Step 3 + reference auto-tagging-eventbridge-lambda.md |\n| Bulk tag\u002Funtag across regions via Tagging API | Step 4 |\n| Wire Config `required-tags` rule | Step 5 |\n| Route tag findings to Security Hub | Step 6 |\n| Remediate missing tags automatically (Config → SSM → Config) | Step 7 |\n| Activate cost allocation tags | Step 8 |\n| Design ABAC IAM policies (aws:ResourceTag \u002F aws:PrincipalTag) | Step 9 |\n| Verify and audit a deployed governance baseline | Step 10 |\n| Avoid common tag-policy and ABAC pitfalls | Anti-Patterns |\n| Recent features (TagPolicy ABAC, CE tag-status API) | Recent AWS features |\n\n## Critical rules at a glance (do NOT bury these)\n\n1. **`enforced_for` is what makes a tag policy enforce.** Without it,\n   the policy defines allowed values but AWS does not block non-compliant\n   `CreateTags` \u002F `PutBucketTagging` \u002F `TagResource` calls. A policy\n   with `allowed_values` but no `enforced_for` is a recommendation, not\n   a guardrail. Always list the resource types explicitly.\n2. **Organizations TagPolicy `allowed_values` matching is case-insensitive\n   by default.** Set `tag_key.case_sensitive: true` if your downstream\n   systems (CUR, ABAC conditions) depend on exact casing. A mismatch\n   between the policy's case sensitivity and your IAM `StringEquals`\n   conditions produces silent ABAC over-grants.\n3. **Tag policies cascade: org root → OU → account → resource.** A\n   child policy does NOT override the parent — it is additive (union of\n   constraints). You cannot relax a parent's `allowed_values` at the\n   child level. If the root says Environment is `prod|dev`, an OU\n   cannot add `staging` without editing the root policy.\n4. **Cost allocation tags require explicit activation in Billing.**\n   Tagging a resource does NOT make the tag appear in Cost Explorer or\n   the Cost and Usage Report (CUR). An administrator must activate each\n   tag key via the Billing console or `ce update-cost-allocation-tags-status`.\n   Activation takes up to 24 hours to propagate.\n5. **ABAC condition keys are case-sensitive at the IAM evaluation layer.**\n   `aws:ResourceTag\u002FEnvironment` with `StringEquals: \"prod\"` does NOT\n   match a resource tagged `Prod`. If your tag policy allows\n   case-insensitive values but your IAM condition uses `StringEquals`,\n   you have a silent gap. Use `StringEqualsIgnoreCase` for ABAC\n   conditions OR enforce case sensitivity in the tag policy.\n\n## Pre-flight: data requirements\n\nDesigning a tag governance baseline requires these inputs:\n\n| Input | Source | Why |\n|---|---|---|\n| Organization ID + root ID | `aws organizations describe-organization` | Tag policy scope |\n| Existing tag policies | `aws organizations list-policies --filter TAG_POLICY` | Don't overwrite blindly |\n| OU structure | `aws organizations list-organizational-units-for-parent` | Where to attach policies |\n| Account → environment mapping | Internal CMDB or account tags | Drives `Environment` allowed_values |\n| Config recorder status | `aws configservice describe-configuration-recorders` | Required-tags rule needs recorder |\n| Existing Config rules | `aws configservice describe-config-rules` | Avoid duplicate required-tags rules |\n| Security Hub enablement | `aws securityhub describe-hub` | Finding aggregation target |\n| Sample resource inventory | `aws resourcegroupstaggingapi get-resources` | Baseline current tag coverage |\n| IAM principal tags (for ABAC) | `aws iam list-user-tags` \u002F `list-role-tags` | ABAC source attributes |\n\n**If the input is malformed** (missing org ID, ambiguous scope), emit:\n\n```text\nGOVERNANCE: \u003Creference>\nVERDICT: ERROR\nREASON: Cannot design tag governance — Organizations root ID and target scope (resource types + accounts) are required.\nGAP: Re-supply describe-organization output and the list of resource types to enforce tagging on.\n```\n\n## Process — Workflow design (apply in order)\n\n### Step 0: Expert knowledge — non-obvious TagPolicy + tagging behaviors\n\n> Moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md#step-0-expert-knowledge--non-obvious-tagpolicy--tagging-behaviors).\n> Ten expert behaviors: enforcement only on enforced_for types, service:resource-type notation typos silently disable enforcement, policies block but never retro-fix, tag-resources is not atomic (check FailedResourcesMap), get-resources is region-scoped, required-tags max 5 keys, cost-tag activation is per-account, aws:PrincipalTag resolves at session creation, aws:RequestTag is create\u002Ftag-only, per-type tagging APIs need branching runbooks, system tags are not enforced.\n\n### Step 1: Define the tag strategy framework\n\nEvery governance engagement starts with a canonical tag key set.\nDefault to this baseline and adjust per organizational requirements:\n\n| Tag key | Category | Required? | Allowed values (example) | Purpose |\n|---|---|---|---|---|\n| `Environment` | Required | Yes | `dev`, `staging`, `prod` | ABAC, cost split, blast-radius scoping |\n| `Owner` | Required | Yes | email or team alias (free-form) | Accountability, alert routing |\n| `Project` | Required | Yes | project code (free-form) | Cost allocation |\n| `CostCenter` | Required | Yes | `cc-1001`, `cc-1002`, ... | Finance reporting |\n| `Application` | Required | Yes | app name (free-form) | Grouping, dependency mapping |\n| `Backup:Required` | Optional | No | `true`, `false` | Backup policy routing |\n| `ComplianceTier` | Optional | No | `tier-1`, `tier-2`, `tier-3` | Audit cadence, SOC scope |\n| `DataClassification` | Optional | No | `public`, `internal`, `confidential` | Macie, KMS routing |\n\n**Decision rules:**\n- Never exceed 10 required tags — operational friction kills adoption.\n- Free-form tags (`Owner`, `Project`) are acceptable for the FIRST pass;\n  tighten to allowed_values once the set stabilizes.\n- Map each tag key to a downstream consumer (Cost Explorer, ABAC, Config,\n  Macie). A tag no consumer reads is dead weight.\n\n### Step 2: Author the Organizations TagPolicy JSON\n\n> Moved to [references\u002Forganizations-tag-policies.md](references\u002Forganizations-tag-policies.md#step-2-author-the-organizations-tagpolicy-json-moved-from-skillmd).\n> Full recipe: enable-policy-type, the canonical baseline TagPolicy JSON (Environment\u002FCostCenter\u002FOwner\u002FProject with case_sensitive + allowed_values + enforced_for), create-policy, attach to root\u002FOU, negative-test enforcement, and the common-errors table (TagPolicyViolationException, silent no-enforcement, additive child limits, PolicyTypeNotEnabledException).\n\n### Step 3: Build EventBridge + Lambda auto-tagging\n\n> Moved to [references\u002Fauto-tagging-eventbridge-lambda.md](references\u002Fauto-tagging-eventbridge-lambda.md#step-3-build-eventbridge--lambda-auto-tagging-moved-from-skillmd).\n> Full recipe: CloudTrail → EventBridge rule (EC2 RunInstances; S3 CreateBucket + Lambda CreateFunction) → the multi-service Python handler with account→Environment mapping, plus the Lambda execution-role permissions and the EventBridge-vs-SSM trade-off table.\n\n### Step 4: Resource Groups Tagging API bulk operations\n\n> Moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md#step-4-resource-groups-tagging-api-bulk-operations).\n> Bulk tag\u002Funtag, multi-region get-resources iteration, get-tag-keys\u002Fvalues, FailedResourcesMap discipline, and the Tag Editor console alternative (manual-only, never the primary mechanism).\n\n### Step 5: Wire Config `required-tags` managed rule\n\n> Moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md#step-5-wire-config-required-tags-managed-rule).\n> required-tags-core put-config-rule CLI (5 keys, 4 resource types), the required-tags-ext second rule for 6+ keys, and describe\u002Fget-compliance verification.\n\n### Step 6: Security Hub integration\n\n> Moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md#step-6-security-hub-integration).\n> FSBP tag controls ([EC2.26]\u002F[S3.10]\u002F[Lambda.3]), enable-security-hub, describe-standards-controls tag query, and the batch-import-findings custom-finding payload.\n\n### Step 7: Automated remediation (Config → SSM → Config re-evaluate)\n\n> Moved to [references\u002Fworked-examples.md](references\u002Fworked-examples.md#step-7-automated-remediation-config--ssm--config-re-evaluate).\n> Pattern A: the Custom-AddRequiredTagsEC2 SSM Automation YAML + put-remediation-configurations wiring (Automatic: false); Pattern B: EventBridge on Config NON_COMPLIANT → Lambda; placeholder remediation requires a human-correction queue.\n\n### Step 8: Activate cost allocation tags\n\nCost allocation tags do NOT appear in Cost Explorer or CUR until\nactivated. Two activation paths:\n\n**Path A — API (preferred for automation):**\n\n```bash\naws ce update-cost-allocation-tags-status \\\n  --cost-allocation-tags-status \\\n    '[{\"TagKey\":\"Environment\",\"Status\":\"Active\"},\n      {\"TagKey\":\"Owner\",\"Status\":\"Active\"},\n      {\"TagKey\":\"Project\",\"Status\":\"Active\"},\n      {\"TagKey\":\"CostCenter\",\"Status\":\"Active\"}]'\n```\n\nVerify:\n\n```bash\naws ce list-cost-allocation-tags \\\n  --status Active\n```\n\n**Path B — Billing console (fallback):**\n\n```\nBilling console → Cost Allocation Tags → user-defined cost allocation tags\n→ Activate each tag key.\n```\n\n**User-defined vs AWS-generated tags:**\n\n| Tag source | Examples | Activation |\n|---|---|---|\n| User-defined | `Owner`, `Environment`, `Project` | Must be activated manually |\n| AWS-generated | `aws:createdBy`, `aws:cloudformation:stack-name` | `aws:createdBy` is auto-active; others must be activated |\n\n**Org payer vs member accounts:** in a consolidated billing family,\nactivate tags on the payer account. The payer's cost allocation tag\nsettings apply to the consolidated CUR. Member-account-specific tags\nrequire per-member activation for member-account-local reporting.\n\nIf the account does NOT support `ce update-cost-allocation-tags-status`\n(legacy accounts or restricted IAM), the activation is a MANUAL step.\nFlag `MANUAL_STEP_REQUIRED` with the Billing-console path.\n\n### Step 9: ABAC IAM policy design\n\nAttribute-based access control uses resource and principal tags in IAM\ncondition keys to make access decisions. ABAC scales better than RBAC\nfor large orgs because new resources and principals inherit access from\ntheir tags — no policy edit needed.\n\n**ABAC condition keys:**\n\n| Condition key | Source | When evaluated |\n|---|---|---|\n| `aws:ResourceTag\u002F\u003Ckey>` | Resource tags | On every API call against the resource |\n| `aws:PrincipalTag\u002F\u003Ckey>` | IAM user\u002Frole session tags | At session creation (fixed for session lifetime) |\n| `aws:RequestTag\u002F\u003Ckey>` | Tags in the API request | On create \u002F tag operations only |\n| `aws:TagKeys` | List of tag keys in request | On tag operations |\n\n**ABAC policy pattern (team-scoped S3 access):**\n\n\n> Policy JSON moved to [references\u002Fworked-examples.md](references\u002Fworked-examples.md#abac-policy-pattern--team-scoped-s3-access-moved-from-skillmd).\n> Two statements: team-tag-gated object actions on team-data-* plus CreateBucket with aws:RequestTag\u002FTeam and ForAllValues aws:TagKeys allow-list.\n\n**ABAC prerequisites checklist:**\n1. IAM principals (users \u002F roles) are tagged with the attribute (e.g., `Team`).\n2. Resources are tagged with the same attribute.\n3. The IAM policy uses `aws:ResourceTag` matching `aws:PrincipalTag`.\n4. The tag policy (Step 2) enforces that the attribute tag key exists on\n   new resources (otherwise ABAC silently breaks for new resources).\n5. Session tags are passed on `AssumeRole` via `--tags` or STS session\n   tagging.\n\n**Common ABAC pitfall:** `StringEquals` is case-sensitive. If your tag\npolicy allows `case_sensitive: false` for `Environment`, but your IAM\ncondition is `StringEquals: {\"aws:ResourceTag\u002FEnvironment\": \"prod\"}`,\na resource tagged `Prod` fails the check. Either enforce\n`case_sensitive: true` in the tag policy OR use\n`StringEqualsIgnoreCase` in the IAM condition.\n\n### Step 10: Audit and verify a deployed governance baseline\n\n> Moved to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md#step-10-audit-and-verify-a-deployed-governance-baseline).\n> Six verification groups: tag policy attached\u002Fenforced, Config rule evaluating, auto-tagger Lambda firing, Security Hub findings, active cost allocation tags, resource tag coverage — plus the \"passes 1-3 but zero cost tags = incomplete\" rule.\n\n## STRICT output contract\n\nEvery output MUST follow this exact structure. Deviations are bugs in\nthe skill.\n\n```text\nGOVERNANCE: \u003Creference>\nSCOPE: \u003Caccounts \u002F OUs \u002F regions covered>\nSTRATEGY:\n  - Required tags: \u003Ccomma-separated keys>\n  - Optional tags: \u003Ccomma-separated keys or \"none\">\n  - Enforcement layer: \u003COrganizations TagPolicy | Config rule | both>\nPOLICY:\n  - Type: \u003COrganizations TagPolicy | Config required-tags | EventBridge auto-tagger | ABAC IAM | conformance pack>\n  - Attached to: \u003Croot | OU | account | resource>\n  - Template: \u003Cinline JSON\u002FYAML or \"see Step N\">\nAUTOMATION:\n  - Auto-tagging: \u003CEventBridge + Lambda | none>\n  - Remediation: \u003CSSM Automation | Lambda | none>\n  - Trigger: \u003Cautomatic | manual>\nCOMPLIANCE:\n  - Detection: \u003CConfig rule name(s)>\n  - Reporting: \u003CSecurity Hub | Config dashboard | both>\n  - Cost allocation: \u003Cactive | inactive | pending>\nVERDICT: AUTOMATED | MANUAL_STEP_REQUIRED\nGAP: \u003Cif MANUAL_STEP_REQUIRED, the specific missing piece>\nTEMPLATE: \u003Cfull CLI snippet or policy JSON>\n```\n\n### Worked example — AUTOMATED, full tag governance baseline\n\n```text\nGOVERNANCE: org-tag-baseline\nSCOPE: org root r-xxxx, all member accounts, us-east-1 + us-west-2\nSTRATEGY:\n  - Required tags: Environment, Owner, Project, CostCenter, Application\n  - Optional tags: Backup:Required, ComplianceTier, DataClassification\n  - Enforcement layer: Organizations TagPolicy + Config required-tags rule\nPOLICY:\n  - Type: Organizations TagPolicy + Config required-tags-core\n  - Attached to: root (policy), Config recorder (rule)\n  - Template: see Step 2 (TagPolicy JSON) + Step 5 (Config rule)\nAUTOMATION:\n  - Auto-tagging: EventBridge + Lambda on RunInstances, CreateBucket, CreateFunction\n  - Remediation: SSM Automation Custom-AddRequiredTagsEC2 (manual trigger, placeholder values)\n  - Trigger: manual (placeholder remediation requires human correction)\nCOMPLIANCE:\n  - Detection: required-tags-core, required-tags-ext\n  - Reporting: Security Hub FSBP controls + Config compliance dashboard\n  - Cost allocation: active (Environment, Owner, Project, CostCenter via ce API)\nVERDICT: AUTOMATED\nGAP: None\nTEMPLATE:\n  aws organizations create-policy --type TAG_POLICY --name baseline-tag-policy --content file:\u002F\u002Ftag-policy.json\n  aws configservice put-config-rule --config-rule '{\"ConfigRuleName\":\"required-tags-core\",\"Source\":{\"Owner\":\"AWS\",\"SourceIdentifier\":\"REQUIRED_TAGS\"},\"Scope\":{\"ComplianceResourceTypes\":[\"AWS::EC2::Instance\",\"AWS::S3::Bucket\",\"AWS::Lambda::Function\",\"AWS::RDS::DBInstance\"]},\"InputParameters\":\"{\\\"tag1Key\\\":\\\"Environment\\\",\\\"tag2Key\\\":\\\"Owner\\\",\\\"tag3Key\\\":\\\"Project\\\",\\\"tag4Key\\\":\\\"CostCenter\\\",\\\"tag5Key\\\":\\\"Application\\\"}\"}'\n  aws ce update-cost-allocation-tags-status --cost-allocation-tags-status '[{\"TagKey\":\"Environment\",\"Status\":\"Active\"},{\"TagKey\":\"Owner\",\"Status\":\"Active\"},{\"TagKey\":\"Project\",\"Status\":\"Active\"},{\"TagKey\":\"CostCenter\",\"Status\":\"Active\"}]'\n```\n\n### Worked example — MANUAL_STEP_REQUIRED, cost allocation activation on legacy account\n\n> Moved to [references\u002Fworked-examples.md](references\u002Fworked-examples.md#worked-example--manual_step_required-cost-allocation-activation-on-legacy-account).\n> Full MANUAL_STEP_REQUIRED report: legacy payer blocks ce update-cost-allocation-tags-status; Billing-console path + 24h propagation.\n\n## Anti-Patterns — NEVER do these things\n\n- NEVER publish a TagPolicy without `enforced_for`. The policy with\n  `allowed_values` but no `enforced_for` is advisory — AWS does not\n  block non-compliant operations. Operators assume enforcement and\n  drift accumulates silently.\n\n- NEVER assume tag policy child policies can override the parent. They\n  cannot. Child OU and account policies are additive (union). To relax\n  a parent's `allowed_values`, edit the parent. A common mistake is\n  attaching a child policy with `allowed_values: [\"staging\"]` and\n  assuming it merges with the parent's `[\"dev\", \"prod\"]` — it does\n  not. The child can only further restrict.\n\n- NEVER use `StringEquals` for ABAC conditions when the tag policy has\n  `case_sensitive: false`. The case-insensitive tag policy allows\n  `Prod` and `prod`; the IAM condition matches only `prod`. This\n  produces silent under-grants (legitimate access denied) OR\n  over-grants (a `Deny` with `StringNotEquals` silently passes). Use\n  `StringEqualsIgnoreCase` for ABAC conditions OR enforce\n  `case_sensitive: true` in the tag policy.\n\n- NEVER assume cost allocation tags are active by default. They are\n  NOT. A fully tagged fleet with zero activated tag keys produces\n  zero cost-dimension data in Cost Explorer and CUR. Always verify\n  with `ce list-cost-allocation-tags --status Active`.\n\n- NEVER deploy a single Config `required-tags` rule for more than 5\n  tag keys. The managed rule silently ignores keys beyond the 5th\n  (`tag6Key`...`tag7Key` are not accepted parameters). Deploy multiple\n  required-tags rules (e.g., `required-tags-core`, `required-tags-ext`).\n\n- NEVER assume `resourcegroupstaggingapi get-resources` returns global\n  results. It is region-scoped. Querying only `us-east-1` misses\n  resources in other regions. Iterate over all enabled regions.\n\n- NEVER ignore `FailedResourcesMap` in a `tag-resources` response. A\n  non-empty map means some resources were not tagged. The API call\n  \"succeeded\" but the tagging is partial. Log, retry, and alert on\n  persistent failures.\n\n- NEVER wire auto-tagging without a tag policy. The Lambda stamps\n  tags on creation, but nothing stops a human from modifying them\n  afterward. Pair auto-tagging with a TagPolicy that enforces\n  `allowed_values` on the same keys.\n\n- NEVER set `Automatic: true` on placeholder-tag remediation (e.g.,\n  `Environment: unknown`) without a downstream human-correction queue.\n  The placeholder satisfies the Config rule but pollutes ABAC and\n  cost reporting. Always flag placeholder remediation as a secondary\n  manual step.\n\n- NEVER use `aws:RequestTag` in a policy governing read operations\n  (`s3:GetObject`, `ec2:DescribeInstances`). `aws:RequestTag` is only\n  present on create \u002F tag API calls. A `Deny` with `aws:RequestTag`\n  on a read operation silently never matches.\n\n- NEVER assume IAM principal tags propagate to existing sessions.\n  `aws:PrincipalTag` is resolved at session creation. Changing a\n  user's `Team` tag does not affect active sessions until they\n  re-authenticate. Coordinate tag changes with session refresh.\n\n- NEVER forget that Organizations TagPolicy does NOT enforce on\n  AWS-generated tags (`aws:cloudformation:stack-name`,\n  `aws:createdBy`). These are system tags. User-defined policies apply\n  only to user-supplied keys. If your ABAC depends on `aws:createdBy`,\n  there is no enforcement lever — it is always present but read-only.\n\n- NEVER deploy ABAC without tagging the IAM principals first. An ABAC\n  policy using `aws:PrincipalTag\u002FTeam` on an untagged role silently\n  denies all access (empty string does not match). Verify principal\n  tags with `iam list-user-tags` \u002F `list-role-tags` before deploying\n  the policy.\n\n- NEVER bulk-tag resources across accounts without assuming a role in\n  each target account. The Tagging API operates within the caller's\n  account. A cross-account bulk-tag script requires `sts:AssumeRole`\n  into each member account.\n\n## Pre-flight safety checks (run before applying any tag governance CLI)\n\n> Moved to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md#pre-flight-safety-checks-run-before-applying-any-tag-governance-cli).\n> Gates: CONFIRM prompt, back up the tag policy (no version history), sandbox-OU test before root, payer API support check, inventory principal tags before ABAC.\n\n## Appendix A — Canonical tag key reference\n\n> Moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md#appendix-a--canonical-tag-key-reference).\n> 12-row canonical key table: required (Environment\u002FOwner\u002FProject\u002FCostCenter\u002FApplication\u002FTeam), optional (Backup:Required\u002FComplianceTier\u002FDataClassification), auto (CreatedAt\u002FCreatorARN\u002FCreatedVia) with consumers.\n\n## Appendix B — Decision tree (which enforcement layer)\n\n```\nIs the requirement to PREVENT non-compliant tags at creation?\n├─ Yes → Organizations TagPolicy with enforced_for (Step 2)\n│         (blocks the API call; does not fix existing resources)\n│\n└─ No → Is the requirement to DETECT and REPORT missing tags?\n        ├─ Yes → Config required-tags rule (Step 5) + Security Hub (Step 6)\n        │\n        └─ No → Is the requirement to AUTO-STAMP tags on creation?\n                ├─ Yes → EventBridge + Lambda auto-tagger (Step 3)\n                │\n                └─ No → Is the requirement to REMEDIATE existing untagged resources?\n                        ├─ Yes → Config → SSM Automation \u002F Lambda remediation (Step 7)\n                        │\n                        └─ No → Is the requirement to USE tags for access decisions?\n                                ├─ Yes → ABAC IAM policy (Step 9)\n                                │\n                                └─ No → Is the requirement for COST REPORTING?\n                                        ├─ Yes → Cost allocation tag activation (Step 8)\n                                        │\n                                        └─ Default: tag strategy framework (Step 1)\n```\n\n## Recent AWS features (2024-2026)\n\n> Moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md#recent-aws-features-2024-2026).\n> TagPolicy ABAC integration, ce update-cost-allocation-tags-status GA, Tagging API pagination lifts, multi required-tags rules, custom Security Hub findings, EventBridge cross-account routing, STS session tagging.\n\n## Expert heuristic: tag governance blast radius\n\n> Moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md#expert-heuristic-tag-governance-blast-radius).\n> Non-negotiable: sandbox-OU test before root; includes the why (fleet-wide CreateTags outage), five scoping techniques, the 3-phase DETECT→sandbox-ENFORCE→root-ENFORCE rollout, cost-tag and ABAC blast radius, and BLAST_RADIUS\u002FVALIDATION_PHASE output fields.\n\n\n## References (load on demand)\n\n- [advanced-patterns](references\u002Fadvanced-patterns.md) — Step 0 expert knowledge, Step 4 Tagging API bulk ops, Step 5 Config rule, Step 6 Security Hub, Appendix A key reference, Recent AWS features, and the blast-radius expert heuristic moved from SKILL.md\n- [worked-examples](references\u002Fworked-examples.md) — Step 7 remediation recipes (SSM YAML + wiring + Pattern B), the ABAC policy JSON, and the MANUAL_STEP_REQUIRED worked example moved from SKILL.md\n- [diagnostic-commands](references\u002Fdiagnostic-commands.md) — Step 10 baseline audit commands and the pre-flight safety checks moved from SKILL.md\n- [organizations-tag-policies](references\u002Forganizations-tag-policies.md) — now also holds the full Step 2 TagPolicy authoring recipe moved from SKILL.md\n- [auto-tagging-eventbridge-lambda](references\u002Fauto-tagging-eventbridge-lambda.md) — now also holds the full Step 3 EventBridge + Lambda auto-tagging recipe moved from SKILL.md\n\n## Domain\n\nAWS CloudOps \u002F Governance Automation — Tag governance, ABAC, cost\nallocation.\n\n## AWS documentation\n\n- **Organizations Tag Policies** — https:\u002F\u002Fdocs.aws.amazon.com\u002Forganizations\u002Flatest\u002Fuserguide\u002Forgs_manage_policies_tag-policies.html\n- **Resource Groups Tagging API** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fresourcegroupstagging\u002Flatest\u002FAPIReference\u002Foverview.html\n- **AWS Config required-tags Rule** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fconfig\u002Flatest\u002Fdeveloperguide\u002Frequired-tags.html\n- **ABAC for AWS** — https:\u002F\u002Fdocs.aws.amazon.com\u002FIAM\u002Flatest\u002FUserGuide\u002Fintroduction_attribute-based-access-control.html\n- **Cost Allocation Tags** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fawsaccountbilling\u002Flatest\u002Faboutv2\u002Fcost-alloc-tags.html\n- **Security Hub Foundational Security Best Practices** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fsecurityhub\u002Flatest\u002Fuserguide\u002Ffsbp-standard.html\n",{"name":5,"license":15,"metadata":24,"description":7,"compatibility":42},{"tags":25,"phase":26,"author":27,"domain":28,"family":29,"version":30,"keywords":31,"task_type":32,"complexity":33,"entry_point":34,"skill_class":35,"when_to_use":36,"requires_llm":37,"verdict_shape":38,"lifecycle_status":39,"invocation_schema":40,"supports_pipeline":37,"activation_triggers":41},"aws-organizations, tag-policy, resource-groups-tagging-api, aws-config, security-hub, abac, eventbridge, lambda, automate","4","Jacky Chan — AWS Community Builder","aws-cloudops","Governance","0.1.0","AWS Organizations, Tag Policy, TagPolicy, allowed_values, enforced_for, Resource Groups Tagging API, tag-resources, untag-resources, AWS Config, required-tags, Security Hub, EventBridge, Lambda auto-tagging, cost allocation tags, ABAC, aws:ResourceTag, aws:PrincipalTag, aws:RequestTag, SSM Automation, tag compliance, tag governance","automate","high","false","capability","Designing Organizations tag policies (allowed_values, case sensitivity, enforced_for), building EventBridge + Lambda auto-tagging pipelines, running Resource Groups Tagging API bulk operations across regions, wiring Config required-tags rules with Security Hub findings, activating cost allocation tags, designing ABAC IAM policies with aws:ResourceTag \u002F aws:PrincipalTag conditions, or remediating untagged resources via Config + SSM Automation.","true","AUTOMATED | MANUAL_STEP_REQUIRED","active","Input: either (a) a tag governance requirement (\"enforce Environment and CostCenter tags on all EC2 and S3 resources\", \"auto-tag Owner on EC2 creation\", \"design ABAC policy for team-scoped access\"), OR (b) an existing tag policy \u002F Config rule \u002F EventBridge rule to audit and harden. Output: deterministic GOVERNANCE block per requirement — STRATEGY\u002FPOLICY\u002FAUTOMATION\u002FCOMPLIANCE\u002FVERDICT — where VERDICT is AUTOMATED (tag policy template ready) or MANUAL_STEP_REQUIRED (specific gap cited, e.g., Billing console activation that cannot be API-driven).","design Organizations TagPolicy, allowed_values enforced_for, auto-tag on creation EventBridge Lambda, Resource Groups Tagging API bulk, tag-resources untag-resources, required-tags Config rule, cost allocation tag activation, ABAC IAM policy ResourceTag, tag compliance remediation, Security Hub tag finding, tag governance baseline","Agent runtime that reads SKILL.md (Claude Code, Cursor, Windsurf, Codex, Gemini). No AWS CLI required for offline policy design. Live deployment uses aws organizations enable-policy-type, create-policy, update-policy, aws resourcegroupstaggingapi tag-resources, untag-resources, get-resources, aws configservice put-config-rule, describe-config-rules, aws ce update-cost-allocation-tags-status, aws ssm create-document, start-automation-execution, and aws lambda create-function with an...","main","eeace51bd5dd1db2030729d83eeab988861553aa","skills\u002Ftag-governance-automator",0,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills","https:\u002F\u002Fgithub.com\u002Fjhkchan","CTO & Co-Founder @Beever-AI  & @votee. CAISP. AWS Community Builder. Organizer@GDGCloudHK. MongoDB Champion. Technopreneur + Infornographer.","2026-09-24 08:54:10",{"source":8,"skillName":5,"commands":52,"prompt":62,"zipAvailable":63},[53,56,59],{"tool":54,"command":55},"npx","npx skills add jhkchan\u002Faws-agent-skills --skill tag-governance-automator",{"tool":57,"command":58},"bunx","bunx skills add jhkchan\u002Faws-agent-skills --skill tag-governance-automator",{"tool":60,"command":61},"pnpm","pnpm dlx skills add jhkchan\u002Faws-agent-skills --skill tag-governance-automator","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Ftag-governance-automator\u002FSKILL.md",true,[65,71,75,79,83,87,91,95,99,103,107,111,115,119,123,127,131,135,139,143],{"path":66,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":69,"sourceHtmlUrl":70},"eval\u002Ftest-cases.yaml","REFERENCE","参考文档",6244,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Ftag-governance-automator\u002Feval\u002Ftest-cases.yaml",{"path":72,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":73,"sourceHtmlUrl":74},"evals\u002Fbaselines\u002Fabac-policy-design.md",843,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Ftag-governance-automator\u002Fevals\u002Fbaselines\u002Fabac-policy-design.md",{"path":76,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":77,"sourceHtmlUrl":78},"evals\u002Fbaselines\u002Fauto-tag-on-create.md",886,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Ftag-governance-automator\u002Fevals\u002Fbaselines\u002Fauto-tag-on-create.md",{"path":80,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":81,"sourceHtmlUrl":82},"evals\u002Fbaselines\u002Fbulk-remediation-config-ssm.md",941,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Ftag-governance-automator\u002Fevals\u002Fbaselines\u002Fbulk-remediation-config-ssm.md",{"path":84,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":85,"sourceHtmlUrl":86},"evals\u002Fbaselines\u002Fmanual-gap-billing-activation.md",603,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Ftag-governance-automator\u002Fevals\u002Fbaselines\u002Fmanual-gap-billing-activation.md",{"path":88,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":89,"sourceHtmlUrl":90},"evals\u002Fbaselines\u002Ftag-policy-org-baseline.md",942,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Ftag-governance-automator\u002Fevals\u002Fbaselines\u002Ftag-policy-org-baseline.md",{"path":92,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":93,"sourceHtmlUrl":94},"evals\u002Feval_config.yaml",1699,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Ftag-governance-automator\u002Fevals\u002Feval_config.yaml",{"path":96,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":97,"sourceHtmlUrl":98},"evals\u002Fevals.json",4271,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Ftag-governance-automator\u002Fevals\u002Fevals.json",{"path":100,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":101,"sourceHtmlUrl":102},"evals\u002Fprompts\u002Fabac-policy-design.md",804,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Ftag-governance-automator\u002Fevals\u002Fprompts\u002Fabac-policy-design.md",{"path":104,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":105,"sourceHtmlUrl":106},"evals\u002Fprompts\u002Fauto-tag-on-create.md",811,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Ftag-governance-automator\u002Fevals\u002Fprompts\u002Fauto-tag-on-create.md",{"path":108,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":109,"sourceHtmlUrl":110},"evals\u002Fprompts\u002Fbulk-remediation-config-ssm.md",1183,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Ftag-governance-automator\u002Fevals\u002Fprompts\u002Fbulk-remediation-config-ssm.md",{"path":112,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":113,"sourceHtmlUrl":114},"evals\u002Fprompts\u002Fmanual-gap-billing-activation.md",983,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Ftag-governance-automator\u002Fevals\u002Fprompts\u002Fmanual-gap-billing-activation.md",{"path":116,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":117,"sourceHtmlUrl":118},"evals\u002Fprompts\u002Ftag-policy-org-baseline.md",678,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Ftag-governance-automator\u002Fevals\u002Fprompts\u002Ftag-policy-org-baseline.md",{"path":120,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":121,"sourceHtmlUrl":122},"examples\u002FREADME.md",8336,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Ftag-governance-automator\u002Fexamples\u002FREADME.md",{"path":124,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":125,"sourceHtmlUrl":126},"references\u002Fadvanced-patterns.md",15334,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Ftag-governance-automator\u002Freferences\u002Fadvanced-patterns.md",{"path":128,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":129,"sourceHtmlUrl":130},"references\u002Fauto-tagging-eventbridge-lambda.md",12394,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Ftag-governance-automator\u002Freferences\u002Fauto-tagging-eventbridge-lambda.md",{"path":132,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":133,"sourceHtmlUrl":134},"references\u002Fdiagnostic-commands.md",2630,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Ftag-governance-automator\u002Freferences\u002Fdiagnostic-commands.md",{"path":136,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":137,"sourceHtmlUrl":138},"references\u002Forganizations-tag-policies.md",8572,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Ftag-governance-automator\u002Freferences\u002Forganizations-tag-policies.md",{"path":140,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":141,"sourceHtmlUrl":142},"references\u002Fworked-examples.md",4945,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Ftag-governance-automator\u002Freferences\u002Fworked-examples.md",{"path":144,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":145,"sourceHtmlUrl":146},"skill.usf.yaml",4673,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Ftag-governance-automator\u002Fskill.usf.yaml",[148,155,162,169,176,183],{"skillNo":149,"name":150,"nameZh":6,"description":151,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":152,"categories":153,"keywords":154,"publishedAt":19},"01M7ADVD60X4PCAPKSE58P9NDC","xray-tracing-deployer","Deploys AWS X-Ray distributed tracing with production-grade configuration: X-Ray daemon deployment (EC2 systemd, ECS sidecar, EKS DaemonSet, Lambda built-in), SDK instrumentation (Java, Python, Node.js, Go, .NET) with annotations and metadata, sampling rules (default reservoir + rate vs custom rules with URL \u002F method \u002F service-name predicates), service map generation, trace query and retrieval, groups and insights, CloudWatch ServiceLens integration, IAM permissions (PutTraceSegments, GetSamplingRules), and latest features (Lambda Powertools tracing, OpenTelemetry \u002F ADOT Collector support, W3C trace context). Emits a READY_TO_DEPLOY checklist with every configuration item verified. Use when enabling X-Ray on a new application, adding tracing to ECS \u002F EKS \u002F Lambda, validating a sampling configuration, or generating daemon deployment CLI and IaC templates. Triggers: X-Ray, distributed tracing, X-Ray daemon, sampling rules, service map, X-Ray SDK, OpenTelemetry, ADOT, Lambda Powertools, CloudWatch ServiceLens.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxray-tracing-deployer\u002FSKILL.md",[],[],{"skillNo":156,"name":157,"nameZh":6,"description":158,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":159,"categories":160,"keywords":161,"publishedAt":19},"01M7ADTVJ7DCBM9CB1FY51GH7J","wellarchitected-workload-auditor","Audits AWS Well-Architected Tool workloads for review staleness, per-pillar high-risk issue counts, milestone tracking gaps, and remediation plan completeness. Emits a deterministic verdict (STALE_REVIEW | HIGH_RISK | CONFIG_GAP | OK) per workload with per-pillar risk breakdown, milestone trend analysis, and specific remediation. Use when reviewing Well-Architected workloads, checking WA review freshness, auditing high-risk issues per pillar, validating milestone coverage, or tracking remediation plans.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwellarchitected-workload-auditor\u002FSKILL.md",[],[],{"skillNo":163,"name":164,"nameZh":6,"description":165,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":166,"categories":167,"keywords":168,"publishedAt":19},"01M7ADT59G6FTTNZYHT2QRPNNP","wellarchitected-review-operator","Operates AWS Well-Architected Tool reviews end-to-end — creates workloads, runs pillar reviews (operational excellence, security, reliability, performance, cost optimization, sustainability, Prosperity), answers questions with risk-tier rationale, generates reports and improvement plans, creates milestones, and integrates with Trusted Advisor and Well-Architected Labs. Runs deterministic pre-checks (workload existence, lens availability, pillar coverage), emits the exact update-answer \u002F get-consolidated-report CLI behind a CONFIRM gate, and verifies risk-tier transitions. Emits READY | BLOCKED | COMPLETED. Use when creating a workload, answering pillar questions, generating an improvement plan, creating a milestone, or integrating with Trusted Advisor. Triggers: well-architected tool, well architected review, workload review, pillar, operational excellence, security, reliability, performance, cost optimization, sustainability, prosperity, improvement plan, milestone, trusted advisor.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwellarchitected-review-operator\u002FSKILL.md",[],[],{"skillNo":170,"name":171,"nameZh":6,"description":172,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":173,"categories":174,"keywords":175,"publishedAt":19},"01M7ADSH5JA9QHNPPHQCD7EVA7","wafv2-web-acl-deployer","Provisions AWS WAFv2 Web ACLs with correct production defaults: scope selection (CLOUDFRONT vs REGIONAL), managed rule groups (AWSManagedRulesCommonRuleSet, SQLiRuleSet, LinuxRuleSet, WindowsRuleSet, IPReputationList, BotControlRuleSet, AmazonIpReputationList, ATP), custom rules (byte match, IP set, regex pattern, geo match, size constraint, rate-based), rule priority ordering, logging destinations (Kinesis Firehose, CloudWatch Logs, S3), resource association (ALB, API Gateway, CloudFront), rate-based rules with aggregate keys (IP, forwarded IP), Challenge and CAPTCHA actions, and account takeover prevention. Emits a READY_TO_DEPLOY checklist. Use when creating a Web ACL, attaching managed rules, configuring rate limiting, enabling WAF logging, associating a Web ACL with an ALB\u002FAPI Gateway\u002FCloudFront, or configuring CAPTCHA\u002FChallenge actions. Triggers: create WAF Web ACL, WAFv2, managed rule groups, WAF rate limiting, WAF logging, WAF CAPTCHA, WAF Challenge action, bot control, ATP managed rules.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwafv2-web-acl-deployer\u002FSKILL.md",[],[],{"skillNo":177,"name":178,"nameZh":6,"description":179,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":180,"categories":181,"keywords":182,"publishedAt":19},"01M7ADRYFAT8R73FBNCHRC573X","wafv2-web-acl-auditor","Audits AWS WAFv2 Web ACL configurations to determine whether the ACL provides effective protection: default-action posture (Allow vs Block), managed-rule-group coverage gaps, rule effectiveness (BLOCK vs COUNT, shadow\u002Fbypass rules, stale exclusions), rate-based rule correctness, logging and visibility configuration, and text-transformation bypass vectors. Emits a deterministic verdict per Web ACL. Use when reviewing a WAFv2 Web ACL for security posture, checking managed-rule coverage, validating rate-limit configuration, auditing WAF logging, or hardening a WAF before production deployment. Triggers: WAF, WAFv2, Web ACL, managed rule group, AWSManagedRules, rate-based rule, CAPTCHA, Challenge, OverrideAction, Count mode, forwarded IP, Bot Control, ATP, text transformation, WAF logging, WAF visibility, OWASP, SQLi, XSS, RFI.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwafv2-web-acl-auditor\u002FSKILL.md",[],[],{"skillNo":184,"name":185,"nameZh":6,"description":186,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":187,"categories":188,"keywords":189,"publishedAt":19},"01M7ADR8W7G72JX4KFGN03QK8Q","waf-rule-deployer","Provisions AWS WAFv2 rule sets with production defaults: Web ACL creation (CloudFront scope in us-east-1 vs Regional scope), rule groups (managed vs custom) with capacity planning in WCU (Web ACL Capacity Units, 1500 default per ACL), managed rule groups (AWSManagedRulesCommonRuleSet, AWSManagedRulesSQLiRuleSet, AWSManagedRulesAmazonIpReputationList, AWSManagedRulesLinuxRuleSet, AWSManagedRulesWindowsRuleSet, AWSManagedRulesUnixRuleSet), custom rules (byte-match, regex pattern set, geo-match, rate-based), IP set and regex pattern set resources, rule priority ordering (lowest number evaluated first), action types (allow, block, count, CAPTCHA, Challenge), bot control managed rule group, account takeover. Triggers: create WAF rule, WAF managed rule group, WAF custom rule, WAF byte match, WAF geo match, WAF rate based rule, WAF IP set, WAF regex pattern set, WAF WCU budget, WAF CloudFront ACL, WAF logging Kinesis Firehose, WAF bot control, WAF ATP, WAF label matching, WAF Challenge action, WAF CAPTCHA.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwaf-rule-deployer\u002FSKILL.md",[],[]]