[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7A4NBPDDYV56ZRGRJQ4Y30N":3,"skill-same:01M7A4NBPDDYV56ZRGRJQ4Y30N":146},{"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":42,"commitSha":43,"skillDirectory":44,"forksCount":45,"repositoryHtmlUrl":46,"repositoryHomepageUrl":6,"ownerHtmlUrl":47,"ownerBlogUrl":6,"ownerDescription":48,"updatedAt":49,"install":50,"resources":63},"01M7A4NBPDDYV56ZRGRJQ4Y30N","cloudformation-stackset-deployer",null,"Provisions AWS CloudFormation StackSets with production defaults: StackSet creation (template, parameters, capabilities), permission model (SELF_MANAGED admin+execution roles vs SERVICE_MANAGED with Organizations trusted access), deployment targets (OUs, accounts, regions), operation preferences (failure tolerance, max concurrent accounts\u002Fregions), drift detection per instance and StackSet-level, StackSet vs nested stacks, managed execution, CloudFormation IaC generator. Emits a READY_TO_DEPLOY checklist. Use when deploying a template across many accounts and\u002For regions, choosing self vs service-managed, scoping OU targets, tuning blast radius, or enabling drift detection. Triggers: create stackset, cloudformation stackset, service-managed stackset, self-managed stackset, StackSet Organizations, stackset drift detection, IaC generator.","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\u002Fcloudformation-stackset-deployer\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: cloudformation-stackset-deployer\ndescription: 'Provisions AWS CloudFormation StackSets with production defaults: StackSet creation (template, parameters, capabilities), permission model (SELF_MANAGED admin+execution roles vs SERVICE_MANAGED with Organizations trusted access), deployment targets (OUs, accounts, regions), operation preferences (failure tolerance, max concurrent accounts\u002Fregions), drift detection per instance and StackSet-level, StackSet vs nested stacks, managed execution, CloudFormation IaC generator. Emits a READY_TO_DEPLOY checklist. Use when deploying a template across many accounts and\u002For regions, choosing self vs service-managed, scoping OU targets, tuning blast radius, or enabling drift detection. Triggers: create stackset, cloudformation stackset, service-managed stackset, self-managed stackset, StackSet Organizations, stackset drift detection, IaC generator.'\nlicense: Apache-2.0\ncompatibility: 'Agent runtime that reads SKILL.md (Claude Code, Cursor, Windsurf, Codex, Gemini). For live deployment: AWS CLI v2 with cloudformation, organizations, and iam access; AWS Organizations must have CloudFormation trusted access enabled for the SERVICE_MANAGED permission model. Works with Terraform aws_cloudformation_stack_set \u002F aws_cloudformation_stack_set_instance resources and CloudFormation AWS::CloudFormation::StackSet templates.'\nmetadata:\n  domain: aws-cloudops\n  complexity: high\n  requires_llm: 'true'\n  phase: '1'\n  supports_pipeline: 'true'\n  entry_point: 'false'\n  family: DevTools\n  task_type: deploy\n  skill_class: capability\n  lifecycle_status: active\n  verdict_shape: READY_TO_DEPLOY | PREREQUISITES_MISSING\n  version: 0.1.0\n  author: Jacky Chan — AWS Community Builder\n  tags: aws, cloudformation, stackset, cloudops, deploy, devtools, provisioning, multi-account, organizations, drift-detection\n  dependencies: aws-orchestrator\n  keywords: aws, cloudformation, stackset, stack set, cloudops, deploy, provisioning, multi-account, multi-region, organizations, self-managed, service-managed, drift detection, stack instances, operation preferences, failure tolerance, max concurrent, nested stacks, iac generator, infrastructure as code\n  when_to_use: Invoke when the user wants to create or update a CloudFormation StackSet to deploy a single template across many AWS accounts and\u002For regions, choose between SELF_MANAGED and SERVICE_MANAGED permission models, target organizational units for automatic member-account deployment, configure operation preferences (failure tolerance, max concurrent accounts\u002Fregions), enable StackSet or per-instance drift detection, decide between StackSets and nested stacks, or generate CloudFormation templates from existing AWS resources via the IaC generator. Do NOT invoke for single-account single-region stacks (use aws cloudformation deploy directly), for drift detection on a standalone stack (use cloudformation-drift-troubleshooter), or for raw stack failures (use cloudformation-stack-troubleshooter).\n---\n\n# CloudFormation StackSet Deployer\n\nAn AWS CloudOps agent skill that provisions AWS CloudFormation\nStackSets with correct defaults. The skill walks the operator\nthrough permission model selection, deployment target scoping,\noperation preferences tuning, and drift detection, captures the\ntemplate+parameters and organization context, explains why each\ndefault matters, and emits a READY_TO_DEPLOY checklist with copy-\npasteable verification commands.\n\n## Activation keywords\n\ncreate stackset, cloudformation stackset, service-managed\nstackset, self-managed stackset, StackSet Organizations, StackSet\ndrift detection, stack instances, deploy template multiple\naccounts, operation preferences, nested stacks vs stacksets, IaC\ngenerator CloudFormation.\n\n## STRICT output contract\n\nWhen this skill is invoked with a StackSet provisioning request\n(template, targets, regions, permission model, or partial config),\nthe agent MUST respond with the READY_TO_DEPLOY checklist from the\n\"Output format\" section using the literal all-caps labels\n`STACKSET:`, `VERDICT:`, `CHECKLIST:`, and\n`VERIFICATION_COMMANDS:`. Do NOT preface with prose, headings, or\ndisclaimers — emit the block as the first response lines. This\ncontract is what assertion-based evals and provisioning pipelines\nrely on; deviating breaks automation silently.\n\nIf any prerequisite is missing, the verdict is\n`PREREQUISITES_MISSING` with a specific gap citation (marked\n`[✗]`), and `READY_TO_DEPLOY` MUST NOT also appear.\n\n## Quick navigation\n\n| Section | When to read |\n|---|---|\n| Prerequisites | Always — verify before provisioning |\n| Step 1 — Permission model (SELF_MANAGED vs SERVICE_MANAGED) | Boundary call |\n| Step 2 — Deployment targets (OUs, accounts, regions) | Scope |\n| Step 3 — StackSet creation (template, parameters, capabilities) | Provisioning core |\n| Step 4 — Operation preferences (failure tolerance, concurrency) | Blast radius |\n| Step 5 — Stack instances (deploy, managed execution) | Instance lifecycle |\n| Step 6 — Drift detection (per-instance and StackSet-level) | Governance |\n| Step 7 — StackSets vs nested stacks | Architecture decision |\n| Step 8 — Update and delete operations | Lifecycle |\n| Step 9 — Recent features (StackSet drift, IaC generator) | Latest |\n| NEVER do these things | Review before signing off |\n| Output format | The literal checklist template |\n| references\u002Fpermission-models-and-roles.md | IAM role deep dive |\n| references\u002Foperation-preferences-and-drift.md | Op prefs + drift detail |\n\n## Mindset\n\nMindset — three StackSet misconceptions moved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\nLoad on demand when framing permission-model and blast-radius decisions.\n\n## Configuration dependency graph (novel heuristic)\n\nStackSet configurations are NOT independent. Several depend on\ntrusted access being enabled first; several are immutable after\ncreation; several silently break downstream member-account stacks.\nUse this graph to sequence provisioning and to debug \"why are my\nstack instances stuck in OUTDATED?\" later.\n\n| Configuration | Hard dependencies (API error without) | Silent failure \u002F immutability | Enables downstream |\n|---|---|---|---|\n| Permission model | SERVICE_MANAGED requires Organizations trusted access enabled | **CANNOT be changed after StackSet creation** — must delete and recreate to switch | service-linked role assumption in member accounts |\n| Administration role (SELF_MANAGED) | IAM role AWSCloudFormationStackSetAdministrationRole in admin account with trust to cloudformation.amazonaws.com | role ARN set at create-time and used on every operation | assume the execution role in each target account |\n| Execution role (SELF_MANAGED) | IAM role in EVERY target account (AWSCloudFormationStackSetExecutionRole) with trust to admin account ID | missing execution role in a target → `StackInstance` goes to `INOPERABLE` | CloudFormation creates the member stack |\n| Deployment targets (SERVICE_MANAGED) | Organizations OU id (ou-xxx) or root id (r-xxx); OrganizationalUnitIds list | future accounts added to the OU are auto-deployed; removed accounts get stack instances deleted | automatic member-account enrollment |\n| Deployment targets (SELF_MANAGED) | list of 12-digit account IDs | new accounts NOT auto-included — must run `create-stack-instances` again | explicit account fan-out |\n| Regions | list of region names | region list is per-deployment-operation; can differ across deployments | per-account × per-region stack instances |\n| Operation preferences | none — defaults apply if omitted | failure tolerance + max concurrency set per-operation, NOT per-StackSet | blast radius control on create\u002Fupdate\u002Fdelete |\n| Capabilities | CAPABILITY_IAM \u002F CAPABILITY_NAMED_IAM \u002F CAPABILITY_AUTO_EXPAND if template creates IAM or uses macros | omitting required capability → `InsufficientCapabilities` error on every operation | IAM-bearing template deployment |\n| Parameters | template parameter declarations | parameters set per-deployment-operation; can override per-account via DeploymentTargets | template customization per target |\n| StackSet drift detection | StackSet exists; both models supported | must be enabled explicitly via `detect-stack-set-drift`; NOT retroactive for past drift | StackSet-level drift status |\n| Stack instance drift | stack instance exists | each instance has its own drift status; detected on-demand or via managed execution | per-instance remediation |\n\nDependency-graph takeaways and cross-dependency gotchas moved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\nLoad on demand when sequencing provisioning or debugging stuck instances.\n\n## Expert heuristic: SELF_MANAGED role handshake lifecycle\n\nSELF_MANAGED role handshake lifecycle heuristic moved verbatim to [references\u002Fpermission-models-and-roles.md](references\u002Fpermission-models-and-roles.md).\nLoad on demand when diagnosing INOPERABLE stack instances.\n\n## Expert heuristic: SERVICE_MANAGED trusted access setup\n\nSERVICE_MANAGED trusted-access setup heuristic moved verbatim to [references\u002Fpermission-models-and-roles.md](references\u002Fpermission-models-and-roles.md).\nLoad on demand when enabling Organizations trusted access.\n\n## Expert heuristic: operation preferences blast radius tuning\n\nOperation-preferences blast-radius tuning heuristic moved verbatim to [references\u002Foperation-preferences-and-drift.md](references\u002Foperation-preferences-and-drift.md).\nLoad on demand when tuning failure tolerance and concurrency.\n\n## Prerequisites (verify before provisioning)\n\nBefore emitting provisioning commands, verify these prerequisites.\nIf any are missing, the verdict is **PREREQUISITES_MISSING**.\n\n| Prerequisite | Why it matters | How to verify |\n|---|---|---|\n| Administrator account | Runs create-stack-set | `aws sts get-caller-identity` |\n| Template body or URL | Template to deploy; >51,200 bytes MUST be in S3 | local file or S3 URL |\n| Permission model decided | IMMUTABLE after creation | SELF_MANAGED vs SERVICE_MANAGED |\n| Organizations trusted access (SERVICE_MANAGED) | Without it, `InvalidOperationException` | `aws organizations list-aws-service-access-for-organization --service-principal cloudformation.amazonaws.com` |\n| Administration role (SELF_MANAGED) | CloudFormation assumes this to fan out | `aws iam get-role --role-name AWSCloudFormationStackSetAdministrationRole` |\n| Execution role in EVERY target (SELF_MANAGED) | Without it, instances are INOPERABLE | `aws iam get-role --role-name AWSCloudFormationStackSetExecutionRole` |\n| Target accounts or OU IDs | Deployment scope | account list or `aws organizations list-organizational-units-for-parent` |\n| Regions list | Account × region pairs | list of enabled regions |\n| Capabilities identified | IAM\u002Fmacro templates require ack | CAPABILITY_IAM \u002F CAPABILITY_NAMED_IAM \u002F CAPABILITY_AUTO_EXPAND |\n| Parameters resolved | Must be supplied at create-stack-set | key\u002Fvalue list |\n\nIf any prerequisite is missing, output `VERDICT: PREREQUISITES_MISSING`\nand cite the specific gap.\n\n## Step 1 — Permission model (SELF_MANAGED vs SERVICE_MANAGED)\n\nThe first decision is the permission model. **Immutable after\nStackSet creation** — to switch, delete and recreate.\n\n**Decision tree:**\n\n```text\nOrganizations enabled + CloudFormation trusted access?\n├── YES → targets are OUs (auto-include future accounts)?\n│    ├── YES → SERVICE_MANAGED  (recommended)\n│    │         No per-account roles; new accounts auto-deployed\n│    │         Management account SKIPPED (use standalone stack)\n│    └── NO  → SERVICE_MANAGED with OrganizationalUnitIds=[\"r-xxx\"]\n└── NO  → SELF_MANAGED  (only option without Organizations)\n          Admin role + execution role in EVERY target account\n          New accounts NOT auto-included\n```\n\n| Feature | SELF_MANAGED | SERVICE_MANAGED |\n|---|---|---|\n| Organizations required | No | Yes (trusted access) |\n| Per-account role setup | Yes (admin + execution roles) | No (service-linked role) |\n| Auto-include new accounts | No — call `create-stack-instances` | Yes — new accounts in OU auto-deployed |\n| Management account deployment | Supported | NOT supported (skipped) |\n| Account filtering | AccountIds list | OrganizationalUnitIds + AccountFilterType (INTERSECTION\u002FDIFFERENCE\u002FTARGET\u002FUNION) |\n| Best for | Single-account multi-region, non-Org | Any org using AWS Organizations |\n\n## Step 2 — Deployment targets (OUs, accounts, regions)\n\nDeployment targets define WHICH accounts and WHICH regions receive\nstack instances. The format depends on the permission model.\n\n**SERVICE_MANAGED deployment targets:**\n\n```bash\naws cloudformation create-stack-instances \\\n  --stack-set-name my-stackset \\\n  --deployment-targets OrganizationalUnitIds=\"ou-xxx-xxxxxxxx\" \\\n  --regions \"us-east-1,us-west-2,eu-west-1\" \\\n  --operation-preferences FailureTolerancePercentage=5,MaxConcurrentPercentage=20\n```\n\n- `OrganizationalUnitIds`: OU IDs (ou-xxx-xxxxxxxx) or root (r-xxx).\n  Deploys to ALL accounts under the OU.\n- `AccountFilterType`: INTERSECTION (default), DIFFERENCE (exclude),\n  TARGET (only), UNION — combined with `AccountFilters` for\n  fine-grained targeting (e.g., deploy to OU but exclude sandboxes).\n\n**SELF_MANAGED deployment targets:**\n\n```bash\naws cloudformation create-stack-instances \\\n  --stack-set-name my-stackset \\\n  --deployment-targets Accounts=\"111111111111,222222222222,333333333333\" \\\n  --regions \"us-east-1,eu-west-1\" \\\n  --operation-preferences FailureToleranceCount=1,MaxConcurrentCount=5\n```\n\n- `Accounts`: explicit list of 12-digit account IDs. Each account\n  MUST have the execution role pre-provisioned.\n\n**Regions** apply to all target accounts (cartesian product).\nRegionConcurrencyType controls PARALLEL vs SEQUENTIAL (with\nRegionOrder) region deployment.\n\n**Common mistake:** targeting root (r-xxx) with SERVICE_MANAGED and\nbeing surprised the management account is skipped. It is ALWAYS\nskipped in SERVICE_MANAGED.\n\n## Step 3 — StackSet creation (template, parameters, capabilities)\n\nOnce the permission model is decided and the template is ready,\ncreate the StackSet.\n\n```bash\naws cloudformation create-stack-set \\\n  --stack-set-name my-stackset \\\n  --template-body file:\u002F\u002Ftemplate.yaml \\\n  --parameters ParameterKey=ExampleParam,ParameterValue=value \\\n  --capabilities CAPABILITY_IAM \\\n  --permission-model SERVICE_MANAGED \\\n  --auto-deployment Enabled=true,RetainStacksOnAccountRemoval=false \\\n  --managed-execution Active=true\n```\n\nFor templates >51,200 bytes, use `--template-url https:\u002F\u002Fs3.amazonaws.com\u002Fmy-bucket\u002Ftemplates\u002Ftemplate.yaml` instead of `--template-body`.\n\n**Key flags:**\n- `--permission-model`: SELF_MANAGED (default) or SERVICE_MANAGED.\n  IMMUTABLE after creation.\n- `--administration-role-arn` \u002F `--execution-role-name`: required\n  for SELF_MANAGED.\n- `--auto-deployment`: SERVICE_MANAGED only. `Enabled=true` auto-\n  deploys to new accounts in targeted OUs.\n  `RetainStacksOnAccountRemoval=false` deletes stacks when accounts\n  leave the OU (recommended for hygiene).\n- `--managed-execution Active=true`: enables StackSet drift\n  detection and automatic reconciliation of targeting changes\n  (SERVICE_MANAGED only).\n- `--capabilities`: required if the template creates IAM resources\n  (`CAPABILITY_IAM`) or uses macros (`CAPABILITY_AUTO_EXPAND`).\n  Without it, every operation fails with `InsufficientCapabilities`.\n\n## Step 4 — Operation preferences (failure tolerance, concurrency)\n\nOperation preferences are passed on EVERY create\u002Fupdate\u002Fdelete-\nstack-instances and update-stack-set call. They are NOT stored on\nthe StackSet itself.\n\n| Field | Type | Description |\n|---|---|---|\n| `FailureToleranceCount` | integer | Instances that can fail before halting |\n| `FailureTolerancePercentage` | integer (0-100) | Same as count, as % of total |\n| `MaxConcurrentCount` | integer | Instances deployed in parallel |\n| `MaxConcurrentPercentage` | integer (0-100) | Same as count, as % of total |\n| `RegionConcurrencyType` | SEQUENTIAL \\| PARALLEL | Regions sequential or parallel |\n| `RegionOrder` | list of region names | Order when SEQUENTIAL |\n\n**Rules:** Count and Percentage are mutually exclusive per operation.\nRegionOrder is ignored when PARALLEL. Defaults:\nFailureToleranceCount=0, MaxConcurrentCount=1, SEQUENTIAL.\n\n**Production recommendation:**\n\n```bash\n--operation-preferences \\\n  FailureTolerancePercentage=5,MaxConcurrentPercentage=20,\\\n  RegionConcurrencyType=SEQUENTIAL,RegionOrder=[\"us-east-1\",\"us-west-2\",\"eu-west-1\"]\n```\n\nTolerates 5% failure, runs 20% of accounts in parallel per region,\ndeploys regions sequentially starting with us-east-1.\n\n## Step 5 — Stack instances (deploy, managed execution)\n\nA stack instance is the deployment of the StackSet's template in\nONE account × ONE region. After create-stack-set, NO instances\nexist yet — you must call create-stack-instances.\n\n**Create stack instances (SERVICE_MANAGED):**\n\n```bash\naws cloudformation create-stack-instances \\\n  --stack-set-name my-stackset \\\n  --deployment-targets OrganizationalUnitIds=\"ou-xxx-xxxxxxxx\" \\\n  --regions \"us-east-1,us-west-2,eu-west-1\" \\\n  --operation-preferences FailureTolerancePercentage=5,MaxConcurrentPercentage=20\n```\n\n**Wait for operation:**\n\n```bash\naws cloudformation describe-stack-set-operation \\\n  --stack-set-name my-stackset \\\n  --operation-id \u003Coperation-id>\n```\n\nStatus: `RUNNING` → `SUCCEEDED` | `FAILED` | `STOPPING` | `STOPPED`.\n\n**Common mistake:** calling create-stack-set and assuming the\ntemplate is deployed. It is NOT. create-stack-set registers the\nStackSet; create-stack-instances is a separate call that actually\ndeploys.\n\n## Step 6 — Drift detection (per-instance and StackSet-level)\n\nStackSets support TWO levels of drift detection.\n\n**Per-instance drift (always available):**\n\n```bash\naws cloudformation detect-stack-set-drift \\\n  --stack-set-name my-stackset \\\n  --operation-preferences MaxConcurrentCount=5\n\naws cloudformation describe-stack-set \\\n  --stack-set-name my-stackset \\\n  --query StackSet.DriftStatus\n```\n\n`StackSet.DriftStatus` values: `DRIFTED` | `IN_SYNC` |\n`NOT_CHECKED` | `UNKNOWN`.\n\n**StackSet-level drift (managed execution, SERVICE_MANAGED):**\n\nFor SERVICE_MANAGED StackSets with `ManagedExecution.Active=true`,\nCloudFormation continuously detects drift on stack instances and\nauto-reconciles drifted instances on the next `update-stack-set`.\n\n**Manual drift remediation:**\n\n```bash\n# Reset a drifted instance (deletes and recreates)\naws cloudformation update-stack-instances \\\n  --stack-set-name my-stackset \\\n  --deployment-targets Accounts=\"111111111111\" \\\n  --regions \"us-east-1\"\n```\n\n**Common mistake:** enabling `ManagedExecution.Active=true` without\nrealizing it AUTO-RECONCILES drift on the next update. If your\nworkflow depends on manual drift review, set `Active=false` and run\n`detect-stack-set-drift` on a schedule.\n\n## Step 7 — StackSets vs nested stacks\n\nA common architecture decision: when to use a StackSet vs nested\nstacks vs a single flat stack.\n\n| Criterion | Single stack | Nested stacks | StackSet |\n|---|---|---|---|\n| Scope | 1 account, 1 region | 1 account, 1 region | N accounts, M regions |\n| Use case | Simple resource group | Decompose a complex template | Fan out one template across accounts\u002Fregions |\n| Composition | Inline resources | `AWS::CloudFormation::Stack` children | One template, parameterized |\n| Update model | One stack | Parent updates propagate to children | `update-stack-set` propagates to all instances |\n| Best for | Single-environment deployments | Templates >500 resources (CFN limit) | Multi-account governance, baseline deployments |\n\n**Rule of thumb:**\n- 1 account, 1 region → single stack or nested stacks.\n- N accounts OR M regions for the SAME template → StackSet.\n- Compose a large template within one account → nested stacks.\n- Deploy a baseline (GuardDuty, Config, IAM roles) across the org →\n  StackSet.\n\n**Anti-pattern:** using a StackSet to deploy a complex multi-\nresource application that should be a single nested-stack\ndeployment. StackSets are for fan-out of the SAME template, not\nfor composition.\n\n## Step 8 — Update and delete operations\n\nUpdate and delete command listings (update-stack-set, delete-stack-instances, delete-stack-set) moved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md).\nLoad on demand when emitting lifecycle commands.\n\n## Step 9 — Recent features\n\nRecent AWS features (StackSet drift status, managed execution, AccountFilterType, IaC generator) moved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\nLoad on demand when confirming feature availability or vintage.\n\n## NEVER do these things\n\n1. **NEVER create a StackSet as SELF_MANAGED and later try to\n   switch it to SERVICE_MANAGED.** The permission model is\n   immutable. You must delete the StackSet (which deletes all\n   stack instances) and recreate. Decide once, up front.\n\n2. **NEVER call `create-stack-set` and assume the template is\n   deployed.** create-stack-set only registers the StackSet. You\n   must call `create-stack-instances` separately to actually deploy\n   to target accounts and regions.\n\n3. **NEVER target the organization root with SERVICE_MANAGED and\n   expect the management account to be deployed.** SERVICE_MANAGED\n   always skips the management account. Use a SELF_MANAGED StackSet\n   or a standalone stack for it.\n\n4. **NEVER omit `--capabilities` if the template creates IAM\n   resources.** Without `CAPABILITY_IAM` (or\n   `CAPABILITY_NAMED_IAM` for named roles), every operation fails\n   with `InsufficientCapabilities`. Macros require\n   `CAPABILITY_AUTO_EXPAND`.\n\n5. **NEVER disable Organizations trusted access while\n   SERVICE_MANAGED StackSets exist.** Disabling trusted access\n   makes all SERVICE_MANAGED StackSets read-only — you cannot\n   create, update, or delete instances until trusted access is\n   re-enabled. Treat it as a permanent dependency.\n\n6. **NEVER use default operation preferences for large fan-outs.**\n   Defaults halt on any failure and deploy one account at a time —\n   too conservative for >10 accounts. Tune explicitly per operation.\n\n7. **NEVER call `delete-stack-set` while stack instances still\n   exist.** Run `delete-stack-instances` for every targeted\n   account\u002Fregion first, then delete the StackSet.\n\n8. **NEVER assume `ManagedExecution.Active=true` only detects\n   drift.** It also AUTO-RECONCILES drifted instances on the next\n   `update-stack-set`. For manual drift review, set `Active=false`.\n\n9. **NEVER set both FailureToleranceCount and\n   FailureTolerancePercentage on the same operation** (same for\n   MaxConcurrentCount vs MaxConcurrentPercentage). They are mutually\n   exclusive.\n\n10. **NEVER use a StackSet where nested stacks are the right tool.**\n    StackSets are for fan-out across accounts\u002Fregions. For\n    decomposing a large template within ONE account and region, use\n    nested stacks.\n\n11. **NEVER assume templates >51,200 bytes can be passed inline.**\n    Upload to S3 and use `--template-url`.\n\n## Output format\n\n```text\nSTACKSET: \u003Cstack-set-name> (template: \u003Ctemplate-source>)\nVERDICT: READY_TO_DEPLOY | PREREQUISITES_MISSING\nCHECKLIST:\n  [✓|✗] Permission model: SELF_MANAGED | SERVICE_MANAGED\n  [✓|✗] Organizations trusted access: Enabled (SERVICE_MANAGED) | N\u002FA (SELF_MANAGED)\n  [✓|✗] Administration role: \u003Cadmin-role-arn> (SELF_MANAGED) | N\u002FA (SERVICE_MANAGED SLR)\n  [✓|✗] Execution role: \u003Cexecution-role-name> in each target account (SELF_MANAGED) | N\u002FA (SERVICE_MANAGED SLR)\n  [✓|✗] Template source: \u003Cfile-path | s3-url> (\u003Csize>; S3 required if >51200 bytes)\n  [✓|✗] Capabilities: CAPABILITY_IAM | CAPABILITY_NAMED_IAM | CAPABILITY_AUTO_EXPAND | NONE\n  [✓|✗] Parameters: \u003Ckey=value list>\n  [✓|✗] Deployment targets: \u003COU IDs | account list> with AccountFilterType=\u003Ctype>\n  [✓|✗] Regions: \u003Cregion list> (RegionConcurrencyType=\u003CSEQUENTIAL|PARALLEL>, RegionOrder=\u003Corder>)\n  [✓|✗] Operation preferences: FailureTolerance\u003CCount|Percentage>=\u003Cn>, MaxConcurrent\u003CCount|Percentage>=\u003Cn>\n  [✓|✗] Auto-deployment: Enabled=true, RetainStacksOnAccountRemoval=false (SERVICE_MANAGED) | N\u002FA\n  [✓|✗] Managed execution: Active=true|false (drift detection + auto-reconcile on update)\n  [✓|✗] Drift detection: detect-stack-set-drift scheduled | managed-execution continuous\n  [✓|✗] Tags: \u003Ckey=value list>\nVERIFICATION_COMMANDS:\n  aws cloudformation describe-stack-set --stack-set-name \u003Cname>\n  aws cloudformation list-stack-instances --stack-set-name \u003Cname> --output table\n  aws cloudformation describe-stack-set-operation --stack-set-name \u003Cname> --operation-id \u003Cop-id>\n  aws organizations list-aws-service-access-for-organization --service-principal cloudformation.amazonaws.com  # SERVICE_MANAGED\n```\n\n### Worked example — SERVICE_MANAGED StackSet for an OU across 3 regions\n\n```text\nSTACKSET: baseline-iam-roles (template: s3:\u002F\u002Fmy-bucket\u002Ftemplates\u002Fbaseline-iam.yaml)\nVERDICT: READY_TO_DEPLOY\nCHECKLIST:\n  [✓] Permission model: SERVICE_MANAGED\n  [✓] Organizations trusted access: Enabled\n  [✓] Administration role: N\u002FA (SERVICE_MANAGED SLR: AWSServiceRoleForCloudFormationStackSetsOrgNS)\n  [✓] Execution role: N\u002FA (SERVICE_MANAGED SLR assumed via trusted access)\n  [✓] Template source: s3:\u002F\u002Fmy-bucket\u002Ftemplates\u002Fbaseline-iam.yaml (18,432 bytes)\n  [✓] Capabilities: CAPABILITY_IAM\n  [✓] Parameters: Environment=production, AuditRoleArn=arn:aws:iam::111111111111:role\u002Faudit\n  [✓] Deployment targets: OrganizationalUnitIds=ou-abc-12345678 (all accounts under Security OU)\n  [✓] Regions: us-east-1, us-west-2, eu-west-1 (RegionConcurrencyType=SEQUENTIAL, RegionOrder=[us-east-1,us-west-2,eu-west-1])\n  [✓] Operation preferences: FailureTolerancePercentage=5, MaxConcurrentPercentage=20\n  [✓] Auto-deployment: Enabled=true, RetainStacksOnAccountRemoval=false\n  [✓] Managed execution: Active=true (drift detection + auto-reconcile)\n  [✓] Drift detection: managed-execution continuous\n  [✓] Tags: Owner=platform, CostCenter=infra\nVERIFICATION_COMMANDS:\n  aws cloudformation describe-stack-set --stack-set-name baseline-iam-roles\n  aws cloudformation list-stack-instances --stack-set-name baseline-iam-roles --output table\n  aws organizations list-aws-service-access-for-organization --service-principal cloudformation.amazonaws.com\n```\n\n## Error handling\n\nError-handling deep dives (INOPERABLE, InvalidOperationException, InsufficientCapabilities, DRIFTED) moved verbatim to [references\u002Ferror-handling.md](references\u002Ferror-handling.md).\nLoad on demand when an operation fails or an instance is stuck.\n\n## References (load on demand)\n\n- [references\u002Fpermission-models-and-roles.md](references\u002Fpermission-models-and-roles.md) — IAM role deep dive; now also holds the SELF_MANAGED handshake and SERVICE_MANAGED trusted-access heuristics moved from SKILL.md.\n- [references\u002Foperation-preferences-and-drift.md](references\u002Foperation-preferences-and-drift.md) — operation preferences and drift detail; now also holds the blast-radius tuning heuristic moved from SKILL.md.\n- [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — Step 8 update\u002Fdelete command listings moved from SKILL.md.\n- [references\u002Ferror-handling.md](references\u002Ferror-handling.md) — INOPERABLE, InvalidOperationException, InsufficientCapabilities, and drift reconciliation handling moved from SKILL.md.\n- [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — mindset, dependency-graph gotchas, and recent AWS features moved from SKILL.md.\n\n## Domain\n\nAWS CloudOps \u002F CloudFormation StackSet Multi-Account Multi-Region\nProvisioning & Governance.\n\n## AWS documentation\n\n- **StackSets User Guide** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAWSCloudFormation\u002Flatest\u002FUserGuide\u002Fwhat-is-cfnstacksets.html\n- **Self-managed permissions** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAWSCloudFormation\u002Flatest\u002FUserGuide\u002Fstacksets-prereqs-self-managed.html\n- **Service-managed permissions** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAWSCloudFormation\u002Flatest\u002FUserGuide\u002Fstacksets-orgs-enable-trusted-access.html\n- **Operation preferences** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAWSCloudFormation\u002Flatest\u002FUserGuide\u002Fstacksets-concepts.html#stacksets-concepts-operation-preferences\n- **StackSet drift detection** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAWSCloudFormation\u002Flatest\u002FUserGuide\u002Fstacksets-drift.html\n- **Managed execution** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAWSCloudFormation\u002Flatest\u002FUserGuide\u002Fstacksets-managed-execution.html\n- **IaC generator** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAWSCloudFormation\u002Flatest\u002FUserGuide\u002Fgenerate-IaC.html\n","# CloudFormation StackSet Deployer\n\nAn AWS CloudOps agent skill that provisions AWS CloudFormation\nStackSets with correct defaults. The skill walks the operator\nthrough permission model selection, deployment target scoping,\noperation preferences tuning, and drift detection, captures the\ntemplate+parameters and organization context, explains why each\ndefault matters, and emits a READY_TO_DEPLOY checklist with copy-\npasteable verification commands.\n\n## Activation keywords\n\ncreate stackset, cloudformation stackset, service-managed\nstackset, self-managed stackset, StackSet Organizations, StackSet\ndrift detection, stack instances, deploy template multiple\naccounts, operation preferences, nested stacks vs stacksets, IaC\ngenerator CloudFormation.\n\n## STRICT output contract\n\nWhen this skill is invoked with a StackSet provisioning request\n(template, targets, regions, permission model, or partial config),\nthe agent MUST respond with the READY_TO_DEPLOY checklist from the\n\"Output format\" section using the literal all-caps labels\n`STACKSET:`, `VERDICT:`, `CHECKLIST:`, and\n`VERIFICATION_COMMANDS:`. Do NOT preface with prose, headings, or\ndisclaimers — emit the block as the first response lines. This\ncontract is what assertion-based evals and provisioning pipelines\nrely on; deviating breaks automation silently.\n\nIf any prerequisite is missing, the verdict is\n`PREREQUISITES_MISSING` with a specific gap citation (marked\n`[✗]`), and `READY_TO_DEPLOY` MUST NOT also appear.\n\n## Quick navigation\n\n| Section | When to read |\n|---|---|\n| Prerequisites | Always — verify before provisioning |\n| Step 1 — Permission model (SELF_MANAGED vs SERVICE_MANAGED) | Boundary call |\n| Step 2 — Deployment targets (OUs, accounts, regions) | Scope |\n| Step 3 — StackSet creation (template, parameters, capabilities) | Provisioning core |\n| Step 4 — Operation preferences (failure tolerance, concurrency) | Blast radius |\n| Step 5 — Stack instances (deploy, managed execution) | Instance lifecycle |\n| Step 6 — Drift detection (per-instance and StackSet-level) | Governance |\n| Step 7 — StackSets vs nested stacks | Architecture decision |\n| Step 8 — Update and delete operations | Lifecycle |\n| Step 9 — Recent features (StackSet drift, IaC generator) | Latest |\n| NEVER do these things | Review before signing off |\n| Output format | The literal checklist template |\n| references\u002Fpermission-models-and-roles.md | IAM role deep dive |\n| references\u002Foperation-preferences-and-drift.md | Op prefs + drift detail |\n\n## Mindset\n\nMindset — three StackSet misconceptions moved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\nLoad on demand when framing permission-model and blast-radius decisions.\n\n## Configuration dependency graph (novel heuristic)\n\nStackSet configurations are NOT independent. Several depend on\ntrusted access being enabled first; several are immutable after\ncreation; several silently break downstream member-account stacks.\nUse this graph to sequence provisioning and to debug \"why are my\nstack instances stuck in OUTDATED?\" later.\n\n| Configuration | Hard dependencies (API error without) | Silent failure \u002F immutability | Enables downstream |\n|---|---|---|---|\n| Permission model | SERVICE_MANAGED requires Organizations trusted access enabled | **CANNOT be changed after StackSet creation** — must delete and recreate to switch | service-linked role assumption in member accounts |\n| Administration role (SELF_MANAGED) | IAM role AWSCloudFormationStackSetAdministrationRole in admin account with trust to cloudformation.amazonaws.com | role ARN set at create-time and used on every operation | assume the execution role in each target account |\n| Execution role (SELF_MANAGED) | IAM role in EVERY target account (AWSCloudFormationStackSetExecutionRole) with trust to admin account ID | missing execution role in a target → `StackInstance` goes to `INOPERABLE` | CloudFormation creates the member stack |\n| Deployment targets (SERVICE_MANAGED) | Organizations OU id (ou-xxx) or root id (r-xxx); OrganizationalUnitIds list | future accounts added to the OU are auto-deployed; removed accounts get stack instances deleted | automatic member-account enrollment |\n| Deployment targets (SELF_MANAGED) | list of 12-digit account IDs | new accounts NOT auto-included — must run `create-stack-instances` again | explicit account fan-out |\n| Regions | list of region names | region list is per-deployment-operation; can differ across deployments | per-account × per-region stack instances |\n| Operation preferences | none — defaults apply if omitted | failure tolerance + max concurrency set per-operation, NOT per-StackSet | blast radius control on create\u002Fupdate\u002Fdelete |\n| Capabilities | CAPABILITY_IAM \u002F CAPABILITY_NAMED_IAM \u002F CAPABILITY_AUTO_EXPAND if template creates IAM or uses macros | omitting required capability → `InsufficientCapabilities` error on every operation | IAM-bearing template deployment |\n| Parameters | template parameter declarations | parameters set per-deployment-operation; can override per-account via DeploymentTargets | template customization per target |\n| StackSet drift detection | StackSet exists; both models supported | must be enabled explicitly via `detect-stack-set-drift`; NOT retroactive for past drift | StackSet-level drift status |\n| Stack instance drift | stack instance exists | each instance has its own drift status; detected on-demand or via managed execution | per-instance remediation |\n\nDependency-graph takeaways and cross-dependency gotchas moved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\nLoad on demand when sequencing provisioning or debugging stuck instances.\n\n## Expert heuristic: SELF_MANAGED role handshake lifecycle\n\nSELF_MANAGED role handshake lifecycle heuristic moved verbatim to [references\u002Fpermission-models-and-roles.md](references\u002Fpermission-models-and-roles.md).\nLoad on demand when diagnosing INOPERABLE stack instances.\n\n## Expert heuristic: SERVICE_MANAGED trusted access setup\n\nSERVICE_MANAGED trusted-access setup heuristic moved verbatim to [references\u002Fpermission-models-and-roles.md](references\u002Fpermission-models-and-roles.md).\nLoad on demand when enabling Organizations trusted access.\n\n## Expert heuristic: operation preferences blast radius tuning\n\nOperation-preferences blast-radius tuning heuristic moved verbatim to [references\u002Foperation-preferences-and-drift.md](references\u002Foperation-preferences-and-drift.md).\nLoad on demand when tuning failure tolerance and concurrency.\n\n## Prerequisites (verify before provisioning)\n\nBefore emitting provisioning commands, verify these prerequisites.\nIf any are missing, the verdict is **PREREQUISITES_MISSING**.\n\n| Prerequisite | Why it matters | How to verify |\n|---|---|---|\n| Administrator account | Runs create-stack-set | `aws sts get-caller-identity` |\n| Template body or URL | Template to deploy; >51,200 bytes MUST be in S3 | local file or S3 URL |\n| Permission model decided | IMMUTABLE after creation | SELF_MANAGED vs SERVICE_MANAGED |\n| Organizations trusted access (SERVICE_MANAGED) | Without it, `InvalidOperationException` | `aws organizations list-aws-service-access-for-organization --service-principal cloudformation.amazonaws.com` |\n| Administration role (SELF_MANAGED) | CloudFormation assumes this to fan out | `aws iam get-role --role-name AWSCloudFormationStackSetAdministrationRole` |\n| Execution role in EVERY target (SELF_MANAGED) | Without it, instances are INOPERABLE | `aws iam get-role --role-name AWSCloudFormationStackSetExecutionRole` |\n| Target accounts or OU IDs | Deployment scope | account list or `aws organizations list-organizational-units-for-parent` |\n| Regions list | Account × region pairs | list of enabled regions |\n| Capabilities identified | IAM\u002Fmacro templates require ack | CAPABILITY_IAM \u002F CAPABILITY_NAMED_IAM \u002F CAPABILITY_AUTO_EXPAND |\n| Parameters resolved | Must be supplied at create-stack-set | key\u002Fvalue list |\n\nIf any prerequisite is missing, output `VERDICT: PREREQUISITES_MISSING`\nand cite the specific gap.\n\n## Step 1 — Permission model (SELF_MANAGED vs SERVICE_MANAGED)\n\nThe first decision is the permission model. **Immutable after\nStackSet creation** — to switch, delete and recreate.\n\n**Decision tree:**\n\n```text\nOrganizations enabled + CloudFormation trusted access?\n├── YES → targets are OUs (auto-include future accounts)?\n│    ├── YES → SERVICE_MANAGED  (recommended)\n│    │         No per-account roles; new accounts auto-deployed\n│    │         Management account SKIPPED (use standalone stack)\n│    └── NO  → SERVICE_MANAGED with OrganizationalUnitIds=[\"r-xxx\"]\n└── NO  → SELF_MANAGED  (only option without Organizations)\n          Admin role + execution role in EVERY target account\n          New accounts NOT auto-included\n```\n\n| Feature | SELF_MANAGED | SERVICE_MANAGED |\n|---|---|---|\n| Organizations required | No | Yes (trusted access) |\n| Per-account role setup | Yes (admin + execution roles) | No (service-linked role) |\n| Auto-include new accounts | No — call `create-stack-instances` | Yes — new accounts in OU auto-deployed |\n| Management account deployment | Supported | NOT supported (skipped) |\n| Account filtering | AccountIds list | OrganizationalUnitIds + AccountFilterType (INTERSECTION\u002FDIFFERENCE\u002FTARGET\u002FUNION) |\n| Best for | Single-account multi-region, non-Org | Any org using AWS Organizations |\n\n## Step 2 — Deployment targets (OUs, accounts, regions)\n\nDeployment targets define WHICH accounts and WHICH regions receive\nstack instances. The format depends on the permission model.\n\n**SERVICE_MANAGED deployment targets:**\n\n```bash\naws cloudformation create-stack-instances \\\n  --stack-set-name my-stackset \\\n  --deployment-targets OrganizationalUnitIds=\"ou-xxx-xxxxxxxx\" \\\n  --regions \"us-east-1,us-west-2,eu-west-1\" \\\n  --operation-preferences FailureTolerancePercentage=5,MaxConcurrentPercentage=20\n```\n\n- `OrganizationalUnitIds`: OU IDs (ou-xxx-xxxxxxxx) or root (r-xxx).\n  Deploys to ALL accounts under the OU.\n- `AccountFilterType`: INTERSECTION (default), DIFFERENCE (exclude),\n  TARGET (only), UNION — combined with `AccountFilters` for\n  fine-grained targeting (e.g., deploy to OU but exclude sandboxes).\n\n**SELF_MANAGED deployment targets:**\n\n```bash\naws cloudformation create-stack-instances \\\n  --stack-set-name my-stackset \\\n  --deployment-targets Accounts=\"111111111111,222222222222,333333333333\" \\\n  --regions \"us-east-1,eu-west-1\" \\\n  --operation-preferences FailureToleranceCount=1,MaxConcurrentCount=5\n```\n\n- `Accounts`: explicit list of 12-digit account IDs. Each account\n  MUST have the execution role pre-provisioned.\n\n**Regions** apply to all target accounts (cartesian product).\nRegionConcurrencyType controls PARALLEL vs SEQUENTIAL (with\nRegionOrder) region deployment.\n\n**Common mistake:** targeting root (r-xxx) with SERVICE_MANAGED and\nbeing surprised the management account is skipped. It is ALWAYS\nskipped in SERVICE_MANAGED.\n\n## Step 3 — StackSet creation (template, parameters, capabilities)\n\nOnce the permission model is decided and the template is ready,\ncreate the StackSet.\n\n```bash\naws cloudformation create-stack-set \\\n  --stack-set-name my-stackset \\\n  --template-body file:\u002F\u002Ftemplate.yaml \\\n  --parameters ParameterKey=ExampleParam,ParameterValue=value \\\n  --capabilities CAPABILITY_IAM \\\n  --permission-model SERVICE_MANAGED \\\n  --auto-deployment Enabled=true,RetainStacksOnAccountRemoval=false \\\n  --managed-execution Active=true\n```\n\nFor templates >51,200 bytes, use `--template-url https:\u002F\u002Fs3.amazonaws.com\u002Fmy-bucket\u002Ftemplates\u002Ftemplate.yaml` instead of `--template-body`.\n\n**Key flags:**\n- `--permission-model`: SELF_MANAGED (default) or SERVICE_MANAGED.\n  IMMUTABLE after creation.\n- `--administration-role-arn` \u002F `--execution-role-name`: required\n  for SELF_MANAGED.\n- `--auto-deployment`: SERVICE_MANAGED only. `Enabled=true` auto-\n  deploys to new accounts in targeted OUs.\n  `RetainStacksOnAccountRemoval=false` deletes stacks when accounts\n  leave the OU (recommended for hygiene).\n- `--managed-execution Active=true`: enables StackSet drift\n  detection and automatic reconciliation of targeting changes\n  (SERVICE_MANAGED only).\n- `--capabilities`: required if the template creates IAM resources\n  (`CAPABILITY_IAM`) or uses macros (`CAPABILITY_AUTO_EXPAND`).\n  Without it, every operation fails with `InsufficientCapabilities`.\n\n## Step 4 — Operation preferences (failure tolerance, concurrency)\n\nOperation preferences are passed on EVERY create\u002Fupdate\u002Fdelete-\nstack-instances and update-stack-set call. They are NOT stored on\nthe StackSet itself.\n\n| Field | Type | Description |\n|---|---|---|\n| `FailureToleranceCount` | integer | Instances that can fail before halting |\n| `FailureTolerancePercentage` | integer (0-100) | Same as count, as % of total |\n| `MaxConcurrentCount` | integer | Instances deployed in parallel |\n| `MaxConcurrentPercentage` | integer (0-100) | Same as count, as % of total |\n| `RegionConcurrencyType` | SEQUENTIAL \\| PARALLEL | Regions sequential or parallel |\n| `RegionOrder` | list of region names | Order when SEQUENTIAL |\n\n**Rules:** Count and Percentage are mutually exclusive per operation.\nRegionOrder is ignored when PARALLEL. Defaults:\nFailureToleranceCount=0, MaxConcurrentCount=1, SEQUENTIAL.\n\n**Production recommendation:**\n\n```bash\n--operation-preferences \\\n  FailureTolerancePercentage=5,MaxConcurrentPercentage=20,\\\n  RegionConcurrencyType=SEQUENTIAL,RegionOrder=[\"us-east-1\",\"us-west-2\",\"eu-west-1\"]\n```\n\nTolerates 5% failure, runs 20% of accounts in parallel per region,\ndeploys regions sequentially starting with us-east-1.\n\n## Step 5 — Stack instances (deploy, managed execution)\n\nA stack instance is the deployment of the StackSet's template in\nONE account × ONE region. After create-stack-set, NO instances\nexist yet — you must call create-stack-instances.\n\n**Create stack instances (SERVICE_MANAGED):**\n\n```bash\naws cloudformation create-stack-instances \\\n  --stack-set-name my-stackset \\\n  --deployment-targets OrganizationalUnitIds=\"ou-xxx-xxxxxxxx\" \\\n  --regions \"us-east-1,us-west-2,eu-west-1\" \\\n  --operation-preferences FailureTolerancePercentage=5,MaxConcurrentPercentage=20\n```\n\n**Wait for operation:**\n\n```bash\naws cloudformation describe-stack-set-operation \\\n  --stack-set-name my-stackset \\\n  --operation-id \u003Coperation-id>\n```\n\nStatus: `RUNNING` → `SUCCEEDED` | `FAILED` | `STOPPING` | `STOPPED`.\n\n**Common mistake:** calling create-stack-set and assuming the\ntemplate is deployed. It is NOT. create-stack-set registers the\nStackSet; create-stack-instances is a separate call that actually\ndeploys.\n\n## Step 6 — Drift detection (per-instance and StackSet-level)\n\nStackSets support TWO levels of drift detection.\n\n**Per-instance drift (always available):**\n\n```bash\naws cloudformation detect-stack-set-drift \\\n  --stack-set-name my-stackset \\\n  --operation-preferences MaxConcurrentCount=5\n\naws cloudformation describe-stack-set \\\n  --stack-set-name my-stackset \\\n  --query StackSet.DriftStatus\n```\n\n`StackSet.DriftStatus` values: `DRIFTED` | `IN_SYNC` |\n`NOT_CHECKED` | `UNKNOWN`.\n\n**StackSet-level drift (managed execution, SERVICE_MANAGED):**\n\nFor SERVICE_MANAGED StackSets with `ManagedExecution.Active=true`,\nCloudFormation continuously detects drift on stack instances and\nauto-reconciles drifted instances on the next `update-stack-set`.\n\n**Manual drift remediation:**\n\n```bash\n# Reset a drifted instance (deletes and recreates)\naws cloudformation update-stack-instances \\\n  --stack-set-name my-stackset \\\n  --deployment-targets Accounts=\"111111111111\" \\\n  --regions \"us-east-1\"\n```\n\n**Common mistake:** enabling `ManagedExecution.Active=true` without\nrealizing it AUTO-RECONCILES drift on the next update. If your\nworkflow depends on manual drift review, set `Active=false` and run\n`detect-stack-set-drift` on a schedule.\n\n## Step 7 — StackSets vs nested stacks\n\nA common architecture decision: when to use a StackSet vs nested\nstacks vs a single flat stack.\n\n| Criterion | Single stack | Nested stacks | StackSet |\n|---|---|---|---|\n| Scope | 1 account, 1 region | 1 account, 1 region | N accounts, M regions |\n| Use case | Simple resource group | Decompose a complex template | Fan out one template across accounts\u002Fregions |\n| Composition | Inline resources | `AWS::CloudFormation::Stack` children | One template, parameterized |\n| Update model | One stack | Parent updates propagate to children | `update-stack-set` propagates to all instances |\n| Best for | Single-environment deployments | Templates >500 resources (CFN limit) | Multi-account governance, baseline deployments |\n\n**Rule of thumb:**\n- 1 account, 1 region → single stack or nested stacks.\n- N accounts OR M regions for the SAME template → StackSet.\n- Compose a large template within one account → nested stacks.\n- Deploy a baseline (GuardDuty, Config, IAM roles) across the org →\n  StackSet.\n\n**Anti-pattern:** using a StackSet to deploy a complex multi-\nresource application that should be a single nested-stack\ndeployment. StackSets are for fan-out of the SAME template, not\nfor composition.\n\n## Step 8 — Update and delete operations\n\nUpdate and delete command listings (update-stack-set, delete-stack-instances, delete-stack-set) moved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md).\nLoad on demand when emitting lifecycle commands.\n\n## Step 9 — Recent features\n\nRecent AWS features (StackSet drift status, managed execution, AccountFilterType, IaC generator) moved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\nLoad on demand when confirming feature availability or vintage.\n\n## NEVER do these things\n\n1. **NEVER create a StackSet as SELF_MANAGED and later try to\n   switch it to SERVICE_MANAGED.** The permission model is\n   immutable. You must delete the StackSet (which deletes all\n   stack instances) and recreate. Decide once, up front.\n\n2. **NEVER call `create-stack-set` and assume the template is\n   deployed.** create-stack-set only registers the StackSet. You\n   must call `create-stack-instances` separately to actually deploy\n   to target accounts and regions.\n\n3. **NEVER target the organization root with SERVICE_MANAGED and\n   expect the management account to be deployed.** SERVICE_MANAGED\n   always skips the management account. Use a SELF_MANAGED StackSet\n   or a standalone stack for it.\n\n4. **NEVER omit `--capabilities` if the template creates IAM\n   resources.** Without `CAPABILITY_IAM` (or\n   `CAPABILITY_NAMED_IAM` for named roles), every operation fails\n   with `InsufficientCapabilities`. Macros require\n   `CAPABILITY_AUTO_EXPAND`.\n\n5. **NEVER disable Organizations trusted access while\n   SERVICE_MANAGED StackSets exist.** Disabling trusted access\n   makes all SERVICE_MANAGED StackSets read-only — you cannot\n   create, update, or delete instances until trusted access is\n   re-enabled. Treat it as a permanent dependency.\n\n6. **NEVER use default operation preferences for large fan-outs.**\n   Defaults halt on any failure and deploy one account at a time —\n   too conservative for >10 accounts. Tune explicitly per operation.\n\n7. **NEVER call `delete-stack-set` while stack instances still\n   exist.** Run `delete-stack-instances` for every targeted\n   account\u002Fregion first, then delete the StackSet.\n\n8. **NEVER assume `ManagedExecution.Active=true` only detects\n   drift.** It also AUTO-RECONCILES drifted instances on the next\n   `update-stack-set`. For manual drift review, set `Active=false`.\n\n9. **NEVER set both FailureToleranceCount and\n   FailureTolerancePercentage on the same operation** (same for\n   MaxConcurrentCount vs MaxConcurrentPercentage). They are mutually\n   exclusive.\n\n10. **NEVER use a StackSet where nested stacks are the right tool.**\n    StackSets are for fan-out across accounts\u002Fregions. For\n    decomposing a large template within ONE account and region, use\n    nested stacks.\n\n11. **NEVER assume templates >51,200 bytes can be passed inline.**\n    Upload to S3 and use `--template-url`.\n\n## Output format\n\n```text\nSTACKSET: \u003Cstack-set-name> (template: \u003Ctemplate-source>)\nVERDICT: READY_TO_DEPLOY | PREREQUISITES_MISSING\nCHECKLIST:\n  [✓|✗] Permission model: SELF_MANAGED | SERVICE_MANAGED\n  [✓|✗] Organizations trusted access: Enabled (SERVICE_MANAGED) | N\u002FA (SELF_MANAGED)\n  [✓|✗] Administration role: \u003Cadmin-role-arn> (SELF_MANAGED) | N\u002FA (SERVICE_MANAGED SLR)\n  [✓|✗] Execution role: \u003Cexecution-role-name> in each target account (SELF_MANAGED) | N\u002FA (SERVICE_MANAGED SLR)\n  [✓|✗] Template source: \u003Cfile-path | s3-url> (\u003Csize>; S3 required if >51200 bytes)\n  [✓|✗] Capabilities: CAPABILITY_IAM | CAPABILITY_NAMED_IAM | CAPABILITY_AUTO_EXPAND | NONE\n  [✓|✗] Parameters: \u003Ckey=value list>\n  [✓|✗] Deployment targets: \u003COU IDs | account list> with AccountFilterType=\u003Ctype>\n  [✓|✗] Regions: \u003Cregion list> (RegionConcurrencyType=\u003CSEQUENTIAL|PARALLEL>, RegionOrder=\u003Corder>)\n  [✓|✗] Operation preferences: FailureTolerance\u003CCount|Percentage>=\u003Cn>, MaxConcurrent\u003CCount|Percentage>=\u003Cn>\n  [✓|✗] Auto-deployment: Enabled=true, RetainStacksOnAccountRemoval=false (SERVICE_MANAGED) | N\u002FA\n  [✓|✗] Managed execution: Active=true|false (drift detection + auto-reconcile on update)\n  [✓|✗] Drift detection: detect-stack-set-drift scheduled | managed-execution continuous\n  [✓|✗] Tags: \u003Ckey=value list>\nVERIFICATION_COMMANDS:\n  aws cloudformation describe-stack-set --stack-set-name \u003Cname>\n  aws cloudformation list-stack-instances --stack-set-name \u003Cname> --output table\n  aws cloudformation describe-stack-set-operation --stack-set-name \u003Cname> --operation-id \u003Cop-id>\n  aws organizations list-aws-service-access-for-organization --service-principal cloudformation.amazonaws.com  # SERVICE_MANAGED\n```\n\n### Worked example — SERVICE_MANAGED StackSet for an OU across 3 regions\n\n```text\nSTACKSET: baseline-iam-roles (template: s3:\u002F\u002Fmy-bucket\u002Ftemplates\u002Fbaseline-iam.yaml)\nVERDICT: READY_TO_DEPLOY\nCHECKLIST:\n  [✓] Permission model: SERVICE_MANAGED\n  [✓] Organizations trusted access: Enabled\n  [✓] Administration role: N\u002FA (SERVICE_MANAGED SLR: AWSServiceRoleForCloudFormationStackSetsOrgNS)\n  [✓] Execution role: N\u002FA (SERVICE_MANAGED SLR assumed via trusted access)\n  [✓] Template source: s3:\u002F\u002Fmy-bucket\u002Ftemplates\u002Fbaseline-iam.yaml (18,432 bytes)\n  [✓] Capabilities: CAPABILITY_IAM\n  [✓] Parameters: Environment=production, AuditRoleArn=arn:aws:iam::111111111111:role\u002Faudit\n  [✓] Deployment targets: OrganizationalUnitIds=ou-abc-12345678 (all accounts under Security OU)\n  [✓] Regions: us-east-1, us-west-2, eu-west-1 (RegionConcurrencyType=SEQUENTIAL, RegionOrder=[us-east-1,us-west-2,eu-west-1])\n  [✓] Operation preferences: FailureTolerancePercentage=5, MaxConcurrentPercentage=20\n  [✓] Auto-deployment: Enabled=true, RetainStacksOnAccountRemoval=false\n  [✓] Managed execution: Active=true (drift detection + auto-reconcile)\n  [✓] Drift detection: managed-execution continuous\n  [✓] Tags: Owner=platform, CostCenter=infra\nVERIFICATION_COMMANDS:\n  aws cloudformation describe-stack-set --stack-set-name baseline-iam-roles\n  aws cloudformation list-stack-instances --stack-set-name baseline-iam-roles --output table\n  aws organizations list-aws-service-access-for-organization --service-principal cloudformation.amazonaws.com\n```\n\n## Error handling\n\nError-handling deep dives (INOPERABLE, InvalidOperationException, InsufficientCapabilities, DRIFTED) moved verbatim to [references\u002Ferror-handling.md](references\u002Ferror-handling.md).\nLoad on demand when an operation fails or an instance is stuck.\n\n## References (load on demand)\n\n- [references\u002Fpermission-models-and-roles.md](references\u002Fpermission-models-and-roles.md) — IAM role deep dive; now also holds the SELF_MANAGED handshake and SERVICE_MANAGED trusted-access heuristics moved from SKILL.md.\n- [references\u002Foperation-preferences-and-drift.md](references\u002Foperation-preferences-and-drift.md) — operation preferences and drift detail; now also holds the blast-radius tuning heuristic moved from SKILL.md.\n- [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — Step 8 update\u002Fdelete command listings moved from SKILL.md.\n- [references\u002Ferror-handling.md](references\u002Ferror-handling.md) — INOPERABLE, InvalidOperationException, InsufficientCapabilities, and drift reconciliation handling moved from SKILL.md.\n- [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — mindset, dependency-graph gotchas, and recent AWS features moved from SKILL.md.\n\n## Domain\n\nAWS CloudOps \u002F CloudFormation StackSet Multi-Account Multi-Region\nProvisioning & Governance.\n\n## AWS documentation\n\n- **StackSets User Guide** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAWSCloudFormation\u002Flatest\u002FUserGuide\u002Fwhat-is-cfnstacksets.html\n- **Self-managed permissions** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAWSCloudFormation\u002Flatest\u002FUserGuide\u002Fstacksets-prereqs-self-managed.html\n- **Service-managed permissions** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAWSCloudFormation\u002Flatest\u002FUserGuide\u002Fstacksets-orgs-enable-trusted-access.html\n- **Operation preferences** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAWSCloudFormation\u002Flatest\u002FUserGuide\u002Fstacksets-concepts.html#stacksets-concepts-operation-preferences\n- **StackSet drift detection** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAWSCloudFormation\u002Flatest\u002FUserGuide\u002Fstacksets-drift.html\n- **Managed execution** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAWSCloudFormation\u002Flatest\u002FUserGuide\u002Fstacksets-managed-execution.html\n- **IaC generator** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAWSCloudFormation\u002Flatest\u002FUserGuide\u002Fgenerate-IaC.html\n",{"name":5,"license":15,"metadata":24,"description":7,"compatibility":41},{"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,"dependencies":37,"requires_llm":38,"verdict_shape":39,"lifecycle_status":40,"supports_pipeline":38},"aws, cloudformation, stackset, cloudops, deploy, devtools, provisioning, multi-account, organizations, drift-detection","1","Jacky Chan — AWS Community Builder","aws-cloudops","DevTools","0.1.0","aws, cloudformation, stackset, stack set, cloudops, deploy, provisioning, multi-account, multi-region, organizations, self-managed, service-managed, drift detection, stack instances, operation preferences, failure tolerance, max concurrent, nested stacks, iac generator, infrastructure as code","deploy","high","false","capability","Invoke when the user wants to create or update a CloudFormation StackSet to deploy a single template across many AWS accounts and\u002For regions, choose between SELF_MANAGED and SERVICE_MANAGED permission models, target organizational units for automatic member-account deployment, configure operation preferences (failure tolerance, max concurrent accounts\u002Fregions), enable StackSet or per-instance drift detection, decide between StackSets and nested stacks, or generate CloudFormation templates from existing AWS resources via the IaC generator. Do NOT invoke for single-account single-region stacks (use aws cloudformation deploy directly), for drift detection on a standalone stack (use cloudformation-drift-troubleshooter), or for raw stack failures (use cloudformation-stack-troubleshooter).","aws-orchestrator","true","READY_TO_DEPLOY | PREREQUISITES_MISSING","active","Agent runtime that reads SKILL.md (Claude Code, Cursor, Windsurf, Codex, Gemini). For live deployment: AWS CLI v2 with cloudformation, organizations, and iam access; AWS Organizations must have CloudFormation trusted access enabled for the SERVICE_MANAGED permission model. Works with Terraform aws_cloudformation_stack_set \u002F aws_cloudformation_stack_set_instance resources and CloudFormation AWS::CloudFormation::StackSet templates.","main","eeace51bd5dd1db2030729d83eeab988861553aa","skills\u002Fcloudformation-stackset-deployer",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":51,"prompt":61,"zipAvailable":62},[52,55,58],{"tool":53,"command":54},"npx","npx skills add jhkchan\u002Faws-agent-skills --skill cloudformation-stackset-deployer",{"tool":56,"command":57},"bunx","bunx skills add jhkchan\u002Faws-agent-skills --skill cloudformation-stackset-deployer",{"tool":59,"command":60},"pnpm","pnpm dlx skills add jhkchan\u002Faws-agent-skills --skill cloudformation-stackset-deployer","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudformation-stackset-deployer\u002FSKILL.md",true,[64,70,74,78,82,86,90,94,98,102,106,110,114,118,122,126,130,134,138,142],{"path":65,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":68,"sourceHtmlUrl":69},"eval\u002Ftest-cases.yaml","REFERENCE","参考文档",6148,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudformation-stackset-deployer\u002Feval\u002Ftest-cases.yaml",{"path":71,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":72,"sourceHtmlUrl":73},"evals\u002Fbaselines\u002Fdrift-detection-managed-execution.md",792,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudformation-stackset-deployer\u002Fevals\u002Fbaselines\u002Fdrift-detection-managed-execution.md",{"path":75,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":76,"sourceHtmlUrl":77},"evals\u002Fbaselines\u002Fmissing-trusted-access.md",753,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudformation-stackset-deployer\u002Fevals\u002Fbaselines\u002Fmissing-trusted-access.md",{"path":79,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":80,"sourceHtmlUrl":81},"evals\u002Fbaselines\u002Foperation-preferences-tuning.md",840,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudformation-stackset-deployer\u002Fevals\u002Fbaselines\u002Foperation-preferences-tuning.md",{"path":83,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":84,"sourceHtmlUrl":85},"evals\u002Fbaselines\u002Fself-managed-account-list.md",854,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudformation-stackset-deployer\u002Fevals\u002Fbaselines\u002Fself-managed-account-list.md",{"path":87,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":88,"sourceHtmlUrl":89},"evals\u002Fbaselines\u002Fservice-managed-ou-deployment.md",915,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudformation-stackset-deployer\u002Fevals\u002Fbaselines\u002Fservice-managed-ou-deployment.md",{"path":91,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":92,"sourceHtmlUrl":93},"evals\u002Feval_config.yaml",1848,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudformation-stackset-deployer\u002Fevals\u002Feval_config.yaml",{"path":95,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":96,"sourceHtmlUrl":97},"evals\u002Fevals.json",12031,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudformation-stackset-deployer\u002Fevals\u002Fevals.json",{"path":99,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":100,"sourceHtmlUrl":101},"evals\u002Fprompts\u002Fdrift-detection-managed-execution.md",591,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudformation-stackset-deployer\u002Fevals\u002Fprompts\u002Fdrift-detection-managed-execution.md",{"path":103,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":104,"sourceHtmlUrl":105},"evals\u002Fprompts\u002Fmissing-trusted-access.md",460,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudformation-stackset-deployer\u002Fevals\u002Fprompts\u002Fmissing-trusted-access.md",{"path":107,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":108,"sourceHtmlUrl":109},"evals\u002Fprompts\u002Foperation-preferences-tuning.md",646,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudformation-stackset-deployer\u002Fevals\u002Fprompts\u002Foperation-preferences-tuning.md",{"path":111,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":112,"sourceHtmlUrl":113},"evals\u002Fprompts\u002Fself-managed-account-list.md",683,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudformation-stackset-deployer\u002Fevals\u002Fprompts\u002Fself-managed-account-list.md",{"path":115,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":116,"sourceHtmlUrl":117},"evals\u002Fprompts\u002Fservice-managed-ou-deployment.md",709,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudformation-stackset-deployer\u002Fevals\u002Fprompts\u002Fservice-managed-ou-deployment.md",{"path":119,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":120,"sourceHtmlUrl":121},"examples\u002FREADME.md",6298,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudformation-stackset-deployer\u002Fexamples\u002FREADME.md",{"path":123,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":124,"sourceHtmlUrl":125},"references\u002Fadvanced-patterns.md",4358,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudformation-stackset-deployer\u002Freferences\u002Fadvanced-patterns.md",{"path":127,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":128,"sourceHtmlUrl":129},"references\u002Fdiagnostic-commands.md",1448,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudformation-stackset-deployer\u002Freferences\u002Fdiagnostic-commands.md",{"path":131,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":132,"sourceHtmlUrl":133},"references\u002Ferror-handling.md",1287,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudformation-stackset-deployer\u002Freferences\u002Ferror-handling.md",{"path":135,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":136,"sourceHtmlUrl":137},"references\u002Foperation-preferences-and-drift.md",8126,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudformation-stackset-deployer\u002Freferences\u002Foperation-preferences-and-drift.md",{"path":139,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":140,"sourceHtmlUrl":141},"references\u002Fpermission-models-and-roles.md",8374,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudformation-stackset-deployer\u002Freferences\u002Fpermission-models-and-roles.md",{"path":143,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":144,"sourceHtmlUrl":145},"skill.usf.yaml",4398,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudformation-stackset-deployer\u002Fskill.usf.yaml",[147,154,161,168,175,182],{"skillNo":148,"name":149,"nameZh":6,"description":150,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":151,"categories":152,"keywords":153,"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":155,"name":156,"nameZh":6,"description":157,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":158,"categories":159,"keywords":160,"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":162,"name":163,"nameZh":6,"description":164,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":165,"categories":166,"keywords":167,"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":169,"name":170,"nameZh":6,"description":171,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":172,"categories":173,"keywords":174,"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":176,"name":177,"nameZh":6,"description":178,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":179,"categories":180,"keywords":181,"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":183,"name":184,"nameZh":6,"description":185,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":186,"categories":187,"keywords":188,"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",[],[]]