[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7A3SJSXSYRZ2S67JN8SE44A":3,"skill-same:01M7A3SJSXSYRZ2S67JN8SE44A":144},{"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":44,"commitSha":45,"skillDirectory":46,"forksCount":47,"repositoryHtmlUrl":48,"repositoryHomepageUrl":6,"ownerHtmlUrl":49,"ownerBlogUrl":6,"ownerDescription":50,"updatedAt":51,"install":52,"resources":65},"01M7A3SJSXSYRZ2S67JN8SE44A","autoscaling-lifecycle-operator",null,"Operates EC2 Auto Scaling lifecycle hook workflows end-to-end — launch lifecycle hook management (pending:wait transition, bootstrap registration, ELB target registration, custom action execution), terminate lifecycle hook management (terminating:wait transition, ELB deregistration, session drain, graceful shutdown), HeartbeatTimeout management (default 3600s, heartbeat extension via record-lifecycle- action-heartbeat), Lambda\u002FEventBridge integration for lifecycle actions (complete-lifecycle-action invocation contract), warm pool configuration (MinSize, MaxGroupPreparedCapacity, pool state transitions), standby state and instance protection, CloudWatch alarm-based scaling policies, scheduled actions, capacity rebalance integration for Spot interruptions, and lifecycle hook notification targets (SNS\u002FSQS\u002FLambda \u002FEventBridge). Runs deterministic pre-checks (hook existence, IAM passrole, notification target ARN validity, HeartbeatTimeout bounds, Lambda complete-lifecycle-action IAM grant, warm pool capacity...","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\u002Fautoscaling-lifecycle-operator\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: autoscaling-lifecycle-operator\ndescription: Operates EC2 Auto Scaling lifecycle hook workflows end-to-end — launch lifecycle hook management (pending:wait transition, bootstrap registration, ELB target registration, custom action execution), terminate lifecycle hook management (terminating:wait transition, ELB deregistration, session drain, graceful shutdown), HeartbeatTimeout management (default 3600s, heartbeat extension via record-lifecycle- action-heartbeat), Lambda\u002FEventBridge integration for lifecycle actions (complete-lifecycle-action invocation contract), warm pool configuration (MinSize, MaxGroupPreparedCapacity, pool state transitions), standby state and instance protection, CloudWatch alarm-based scaling policies, scheduled actions, capacity rebalance integration for Spot interruptions, and lifecycle hook notification targets (SNS\u002FSQS\u002FLambda \u002FEventBridge). Runs deterministic pre-checks (hook existence, IAM passrole, notification target ARN validity, HeartbeatTimeout bounds, Lambda complete-lifecycle-action IAM grant, warm pool capacity...\nlicense: Apache-2.0\ncompatibility: Agent runtime that reads SKILL.md (Claude Code, Cursor, Windsurf, Codex, Gemini). No AWS CLI required for offline plan classification. Live-account operations use aws autoscaling describe-lifecycle-hooks, put-lifecycle- hook, delete-lifecycle-hook, complete-lifecycle-action, record-lifecycle- action-heartbeat, describe-warm-pool, put-warm-pool, describe-auto- scaling-groups, update-auto-scaling-group, set-instance-protection, enter-standby, exit-standby, put-scheduled-action...\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: Compute\n  task_type: operate\n  skill_class: capability\n  lifecycle_status: active\n  verdict_shape: OPERATION_COMPLETED | REVIEW_REQUIRED\n  when_to_use: Adding or modifying launch\u002Fterminate lifecycle hooks, debugging stuck lifecycle instances (pending:wait or terminating:wait), configuring warm pools for faster scale-out, wiring graceful-drain Lambdas for ELB deregistration and session drain, setting instance protection or standby state, integrating capacity rebalance with Spot interruptions, creating scheduled actions or CloudWatch alarm-based scaling policies, or routing lifecycle notifications to SNS\u002FSQS\u002FLambda.\n  when_not_to_use: EC2 instance-level OS patching or application deployment (use an SSM or CodeDeploy skill), ECS\u002FFargate service autoscaling (use an ECS autoscaling skill), Auto Scaling group creation from scratch (use a provisioning skill), or cost optimization of EC2 fleets (use an EC2 rightsizing skill). This skill focuses on lifecycle hook operations and warm pool management, not fleet provisioning or cost optimization.\n  activation_triggers: add lifecycle hook, launch lifecycle hook, terminate lifecycle hook, lifecycle hook timeout, HeartbeatTimeout, complete-lifecycle-action, stuck lifecycle instance, pending wait stuck, terminating wait stuck, warm pool configuration, warm pool MinSize, capacity rebalance, graceful drain, ELB deregistration lifecycle, session drain, instance protection, standby state, enter standby, exit standby, scheduled action autoscaling, scaling policy, CloudWatch alarm scaling, Spot interruption lifecycle, SNS lifecycle notification, SQS lifecycle notification, EventBridge lifecycle, lifecycle Lambda, bootstrap on launch\n  invocation_schema: 'Input: either (a) an Auto Scaling group configuration (describe-auto- scaling-groups output) plus the intended operation (add-launch-hook, add-terminate-hook, modify-hook, delete-hook, configure-warm-pool, set-protection, enter-standby, exit-standby, add-scheduled-action, add-scaling-policy, enable-capacity-rebalance, diagnose-stuck), OR (b) an ASG name + operation for live-account execution. Output: a deterministic OPERATION \u002F VERDICT \u002F PRE_CHECKS \u002F STEPS \u002F POST_VERIFY \u002F NOTES block per lifecycle operation, where VERDICT is one of OPERATION_COMPLETED, REVIEW_REQUIRED.'\n  version: 0.1.0\n  author: Jacky Chan — AWS Community Builder\n  keywords: Auto Scaling, lifecycle hook, launch lifecycle hook, terminate lifecycle hook, HeartbeatTimeout, DefaultResult, CONTINUE, ABANDON, complete-lifecycle-action, record-lifecycle-action-heartbeat, pending:wait, Pending:Wait, Terminating:Wait, InService, warm pool, warm pool MinSize, MaxGroupPreparedCapacity, warm pool state, capacity rebalance, instance protection, standby, EnterStandby, ExitStandby, graceful drain, ELB deregistration, target group deregistration, connection drain, session drain, scheduled action, scaling policy, CloudWatch alarm, step scaling, target tracking, Spot Instance Interruption, SNS notification, SQS notification, EventBridge, lifecycle Lambda, bootstrap registration\n  tags: aws, autoscaling, compute, lifecycle, ec2, warm-pool, spot, elb, lambda, eventbridge, operate\n---\n\n# Auto Scaling Lifecycle Hook Operator\n\n## What this skill does\n\nExecutes EC2 Auto Scaling lifecycle hook operations correctly and safely.\nRuns deterministic pre-checks before any state-changing CLI (hook existence,\nHeartbeatTimeout bounds, notification target ARN validity, IAM passrole for\nservice-linked role, Lambda complete-lifecycle-action grant, warm pool\ncapacity headroom, ELB target group health), executes the operation behind\na CONFIRM gate, and verifies the result by confirming the hook is active,\nlifecycle transitions complete within the expected window, and no instances\nremain stuck in `Pending:Wait` or `Terminating:Wait`.\n\n## Quick navigation\n\n| Section | What it covers | When to read it |\n|---|---|---|\n| **Quick reference** | Verdict thresholds + pre-check priority | Before any operation |\n| **Mindset** | Why lifecycle hooks extend the transition, the stuck-instance trap | Understanding the safety model |\n| **Pre-flight** | ASG metadata gate — hook config, warm pool state, notification targets | Before executing any CLI |\n| **Process** | Per-operation planning: add-hook, warm-pool, diagnose-stuck | When choosing which operation |\n| **Output format** | Structured OPERATION\u002FVERDICT\u002FPRE_CHECKS\u002FSTEPS template | Formatting the response |\n| **Anti-Patterns** | NEVER list — common mistakes that strand instances | Review before risky operations |\n\n## Quick reference — verdict thresholds\n\n| Verdict | Trigger condition | Action |\n|---|---|---|\n| `REVIEW_REQUIRED` | One or more pre-checks failed (hook missing required notification target, HeartbeatTimeout outside 30-7200s, Lambda lacks complete-lifecycle-action IAM grant, warm pool MaxGroupPreparedCapacity \u003C MinSize, capacity rebalance conflicts with lifecycle hook) | List failures, do NOT execute |\n| `OPERATION_COMPLETED` | Operation finished and post-verification passed (hook Active, lifecycle transition completed, warm pool at desired capacity, no instances stuck) | Emit verification results, monitoring plan |\n\n**Priority order for pre-checks (apply in this sequence):**\n\n1. **ASG existence and state** — group exists, not being deleted, has a\n   launch template\u002Fversion.\n2. **Hook configuration** — no conflicting hook with the same name.\n3. **HeartbeatTimeout bounds** — between 30 and 7200 seconds (default 3600).\n4. **Notification target validity** — SNS\u002FSQS\u002FLambda ARN exists and is\n   active. SNS\u002FSQS requires the ASG service-linked role to have\n   `sns:Publish` or `sqs:SendMessage`.\n5. **IAM passrole** — `AWSServiceRoleForAutoScaling` exists with required\n   permissions.\n6. **Lambda complete-lifecycle-action grant** — lifecycle Lambda execution\n   role has `autoscaling:CompleteLifecycleAction` on the ASG ARN.\n7. **Warm pool capacity** — `MaxGroupPreparedCapacity` >= `MinSize` and \u003C=\n   ASG `MaxSize`.\n8. **ELB integration** — target group deregistration delay compatible with\n   terminate hook HeartbeatTimeout.\n9. **Capacity rebalance** — if enabled, terminate hooks must complete within\n   the Spot 2-minute rebalance window.\n\n**Time baselines (2026):**\n\n- Launch hook: adds `HeartbeatTimeout` seconds to `Pending:Wait` ->\n  `InService`. With 300s hook and 60s bootstrap, total is 300s (bootstrap\n  runs within the wait window).\n- Terminate hook: adds `HeartbeatTimeout` seconds to `Terminating:Wait` ->\n  `Terminated`. ELB deregistration drain runs concurrently with the hook.\n- Warm pool: pre-booted `Stopped` instances resume to `Running` in ~10-30s\n  (vs. 60-120s cold launch).\n- Capacity rebalance: rebalance recommendation + 2-min interruption notice\n  gives ~4 min total; terminate hook must complete within this window.\n\n## Mindset\n\n**One-line takeaway:** A lifecycle hook extends the instance state\ntransition by `HeartbeatTimeout` seconds. During this window, the instance\nstays in `Pending:Wait` or `Terminating:Wait` and the action Lambda must\ncall `complete-lifecycle-action` before the timeout expires or the\n`DefaultResult` (CONTINUE or ABANDON) determines the outcome.\n\n- **A lifecycle hook is a timer, not a gate.** The hook gives a window to\n  do work (bootstrap, drain) but does not block forever. If the Lambda\n  never calls `complete-lifecycle-action`, the hook expires after\n  `HeartbeatTimeout` and `DefaultResult` fires: CONTINUE (proceed) or\n  ABANDON (for launch: terminate and replace; for terminate: terminate\n  anyway). A Lambda that silently fails without completing is the #1 cause\n  of stuck instances.\n\n- **Warm pool changes the scale-out math.** Without a warm pool, a new\n  instance takes 60-120 seconds (AMI boot + userdata + app startup). With\n  a warm pool, pre-booted `Stopped` instances resume to `Running` in 10-30\n  seconds. But the launch lifecycle hook still fires on every transition\n  from warm pool to the ASG — the hook Lambda must handle warm-pool-\n  sourced instances (they already have the OS booted).\n\n- **Capacity rebalance + terminate hook is a race against the Spot clock.**\n  When Spot capacity is at risk, EC2 sends a rebalance recommendation\n  followed by a 2-minute interruption notice. The ASG (with capacity\n  rebalance) launches a replacement and starts draining the old instance\n  via the terminate hook. The terminate hook HeartbeatTimeout must be short\n  enough to complete within the interruption window (default 3600s is too\n  long for Spot — use 30-120s).\n\n## Pre-flight: ASG metadata gate\n\nRun before classification. Misclassifying these produces wrong plans.\n\n**Pagination:** `describe-auto-scaling-groups` paginates at 50\u002Fpage.\n`describe-lifecycle-hooks` returns all hooks in one call. `describe-warm-\npool` paginates at 100 instances\u002Fpage.\n\nLive-account pre-flight commands moved to [references\u002Fdiagnostic-procedures.md](references\u002Fdiagnostic-procedures.md).\nLoad that file before executing against a live account.\n\n**Malformed input:** emit `VERDICT: ERROR` with `REASON: ASG\u002Foperation\nconfiguration is not valid JSON or is missing required fields` and\n`REMEDIATION: Re-fetch with aws autoscaling describe-auto-scaling-groups\n--auto-scaling-group-names \u003Cname> --output json`.\n\n| ASG attribute | Effect on operation |\n|---|---|\n| ASG not found | All operations BLOCKED. |\n| `MixedInstancesPolicy` with Spot | Capacity rebalance likely enabled; terminate hooks must be short (30-120s). |\n| No lifecycle hooks configured | Add-hook operations proceed; diagnose-stuck returns \"no hooks\". |\n| Existing hook with same name | Add-hook BLOCKED; use modify-hook. |\n| `HeartbeatTimeout` outside 30-7200 | Invalid; put-lifecycle-hook will fail. |\n| `NotificationTargetARN` null or invalid | Lambda never invoked; hook is a no-op timer. |\n| Warm pool `MaxGroupPreparedCapacity` \u003C `PoolMinSize` | Invalid configuration. |\n| `TargetGroupARNs` present | ELB deregistration delay interacts with terminate hook timeout. |\n| `HealthCheckType: ELB` with short `HealthCheckGracePeriod` | Launch hook must complete before grace period or ELB marks instance unhealthy. |\n| `CapacityRebalance: true` | Terminate hook fires on rebalance + interruption; must complete within Spot 2-min notice. |\n\n## Process — operation planning (apply in order)\n\n### Step 0: Expert knowledge — non-obvious Auto Scaling lifecycle behaviors\n\nDeep dive moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md)\n(Step 0: non-obvious lifecycle behaviors) — load before complex hook\u002Fwarm-pool decisions.\n\n### Step 1: Pre-check gate — REVIEW_REQUIRED if any check fails\n\n**For ALL operations:** ASG exists, has a launch template, not being\ndeleted.\n\n**For add-launch-hook:** No existing hook with same name.\n`HeartbeatTimeout` in [30, 7200]. `DefaultResult` is CONTINUE or ABANDON.\n`NotificationTargetARN` is valid and active. If SNS\u002FSQS: service-linked\nrole has `sns:Publish` or `sqs:SendMessage`. If Lambda: execution role has\n`autoscaling:CompleteLifecycleAction`. If ELB: `HealthCheckGracePeriod`\n>= expected bootstrap duration. `RoleARN` has trust policy for\n`autoscaling.amazonaws.com`.\n\n**For add-terminate-hook:** Same as launch plus: if capacity rebalance\nenabled, `HeartbeatTimeout` \u003C= 120. If ELB target groups:\n`deregistration_delay.timeout_seconds` \u003C= `HeartbeatTimeout`.\n\n**For modify-hook:** Hook exists. New `HeartbeatTimeout` in [30, 7200].\nNew notification target passes validity checks.\n\n**For delete-hook:** Hook exists. No instances currently in\n`Pending:Wait` or `Terminating:Wait` for this hook.\n\n**For configure-warm-pool:** `PoolMinSize` >= 0.\n`MaxGroupPreparedCapacity` >= `PoolMinSize` and \u003C= ASG `MaxSize`.\n`DesiredCapacity` + `PoolMinSize` does not exceed account vCPU limits or\nsubnet IP availability. Launch template supports Stop\u002FStart.\n\n**For set-protection:** Instances are members of the ASG and `InService`.\n\n**For enter-standby \u002F exit-standby:** Instances are members; for enter:\n`InService` with `ShouldDecrementDesiredCapacity` specified; for exit: in\n`Standby`.\n\n**For add-scheduled-action:** No existing action with same name. `Recurrence`\nis valid cron. `MinSize` \u003C= `DesiredCapacity` \u003C= `MaxSize`.\n\n**For add-scaling-policy:** No existing policy with same name. Target\ntracking: `TargetValue` > 0. Step scaling: alarm exists or will be created.\n\n**For enable-capacity-rebalance:** ASG has Spot instances. Existing\nterminate hooks have `HeartbeatTimeout` \u003C= 120.\n\n**For diagnose-stuck (read-only):** Read hook state, CloudWatch Logs, and\nthe stuck-instance table to identify root cause.\n\n**Stuck-instance failure-mode table:**\n\n| Symptom | Root cause | Fix |\n|---|---|---|\n| `Pending:Wait` > HeartbeatTimeout | Lambda never called complete-lifecycle-action | Check Lambda logs; call complete manually |\n| `Pending:Wait`, Lambda `AccessDenied` on `CompleteLifecycleAction` | Lambda role missing permission | Add `autoscaling:CompleteLifecycleAction` to role |\n| `Terminating:Wait` > HeartbeatTimeout | Same as above for terminate | Same fix |\n| `Pending:Wait`, Lambda never invoked | EventBridge rule missing or SNS unconfirmed | Check rule pattern; confirm SNS subscription |\n| `Pending:Wait`, event missing `LifecycleActionToken` | EventBridge rule wrong detail type | Match `EC2 Instance-launch Lifecycle Action` |\n| Warm pool instance stuck in `Pending:Wait` | Lambda not designed for warm pool | Update Lambda to detect warm-pool instances |\n| Instance terminated despite terminate hook | Spot force-kill; HeartbeatTimeout was 3600s | Reduce to \u003C= 120 for Spot ASGs |\n| `put-lifecycle-hook` `ValidationError` | HeartbeatTimeout outside 30-7200 or malformed ARN | Correct parameters |\n| Multiple hooks, instance stuck between hooks | Each hook must complete before next | Reduce hooks or shorten timeouts |\n\n### Step 2: READY — emit operation plan\n\nIf all pre-checks pass, emit `VERDICT: READY` with the exact CLI sequence\nand CONFIRM gate. The plan includes the exact CLI command, expected\nduration, side-effects, CONFIRM prompt, and monitoring step.\n\n### Step 3: Execute behind CONFIRM gate\n\n- **MANDATORY CONFIRMATION GATE.** Before any state-changing CLI\n  (`put-lifecycle-hook`, `delete-lifecycle-hook`, `complete-lifecycle-\n  action`, `put-warm-pool`, `set-instance-protection`, `enter-standby`,\n  `exit-standby`, `put-scheduled-action`, `put-scaling-policy`,\n  `update-auto-scaling-group`), emit `CONFIRM: About to \u003Coperation> on\n  \u003Casg-name> in account \u003Caccount> region \u003Cregion>. This will\n  \u003Cconsequence>. Proceed? (yes\u002Fno)`.\n- Capture pre-state: `describe-lifecycle-hooks` and `describe-auto-scaling-\n  groups` output saved to `\u002Ftmp\u002F\u003Casg>-*-$(date +%s).json`.\n- Execute the CLI. For `put-lifecycle-hook`, the hook is immediately active.\n- For hooks with a Lambda: `aws logs tail \u002Faws\u002Flambda\u002F\u003Clifecycle-lambda>\n  --follow --since 5m`.\n\n### Step 4: Post-verification — OPERATION_COMPLETED\n\nALL checks must pass for `OPERATION_COMPLETED`:\n1. `describe-lifecycle-hooks` confirms hook with correct configuration.\n2. For add\u002Fmodify-hook: test scale-out confirms instance enters\n   `Pending:Wait`, Lambda fires, transitions to `InService`.\n3. For configure-warm-pool: `describe-warm-pool` confirms correct\n   `PoolMinSize`, `MaxGroupPreparedCapacity`, instances present.\n4. For set-protection\u002Fstandby: confirm instance state via\n   `describe-auto-scaling-groups`.\n5. CloudWatch shows no lifecycle timeout errors (15-min sample).\n\nIf ANY verification fails, emit `VERDICT: ERROR` — route to diagnose-stuck.\n\n## Output format (per operation)\n\n```text\nOPERATION: \u003Cadd-launch-hook | add-terminate-hook | modify-hook | delete-hook | configure-warm-pool | set-protection | enter-standby | exit-standby | add-scheduled-action | add-scaling-policy | enable-capacity-rebalance | diagnose-stuck>\nVERDICT: OPERATION_COMPLETED | REVIEW_REQUIRED\nTARGET: \u003Casg-name> (hook: \u003Chook-name-or-\"none\">)\nPRE_CHECKS:\n  - [PASS] \u003Ccheck description>\n  - [FAIL] \u003Ccheck description> — \u003Creason>\nSTEPS:\n  1. \u003CCLI command with flags populated>\n  2. \u003Cwait \u002F monitoring command>\nPOST_VERIFY:\n  - [PASS] \u003Cverification description>\nNOTES: \u003Cmonitoring, caveats, warm pool state>\n```\n\n### Worked example — add-launch-hook (bootstrap registration)\n\n```text\nOPERATION: add-launch-hook\nVERDICT: OPERATION_COMPLETED\nTARGET: prod-web-asg (hook: web-bootstrap-hook)\nPRE_CHECKS:\n  - [PASS] ASG exists, DesiredCapacity: 4, MaxSize: 20\n  - [PASS] No existing hook named web-bootstrap-hook\n  - [PASS] HeartbeatTimeout: 300 (in [30, 7200])\n  - [PASS] DefaultResult: CONTINUE\n  - [PASS] Lambda web-lifecycle-action State: Active\n  - [PASS] Lambda role has autoscaling:CompleteLifecycleAction\n  - [PASS] HealthCheckGracePeriod: 600 >= bootstrap 120s\nSTEPS:\n  1. CONFIRM: About to add launch lifecycle hook web-bootstrap-hook\n     on prod-web-asg with HeartbeatTimeout 300s, DefaultResult CONTINUE,\n     Lambda web-lifecycle-action. New instances enter Pending:Wait for\n     up to 300s during bootstrap. Proceed? (yes\u002Fno)\n  2. aws autoscaling put-lifecycle-hook \\\n       --lifecycle-hook-name web-bootstrap-hook \\\n       --auto-scaling-group-name prod-web-asg \\\n       --lifecycle-transition autoscaling:EC2_INSTANCE_LAUNCHING \\\n       --heartbeat-timeout 300 \\\n       --default-result CONTINUE \\\n       --notification-target-arn arn:aws:lambda:us-east-1:111111111111:function:web-lifecycle-action\nPOST_VERIFY:\n  - [PASS] describe-lifecycle-hooks: web-bootstrap-hook active\n  - [INFO] Test scale-out: instance entered Pending:Wait, Lambda invoked,\n    transitioned to InService in 87s\nNOTES:\n  - If Lambda crashes, instance stays in Pending:Wait for 300s, then\n    DefaultResult CONTINUE fires. Monitor Lambda errors.\n  - For warm-pool instances, Lambda detects already-booted OS and\n    skips AMI-level bootstrap.\n```\n\n### Worked example — diagnose-stuck (REVIEW_REQUIRED)\n\nFull example moved to [references\u002Fworked-examples.md](references\u002Fworked-examples.md).\nLoad it when formatting a diagnose-stuck REVIEW_REQUIRED response.\n\n## Anti-Patterns — NEVER\n\n- NEVER set HeartbeatTimeout to 3600 (the default) without calculating the\n  expected action duration. Set to 2-3x the expected bootstrap\u002Fdrain time.\n\n- NEVER deploy a lifecycle Lambda without\n  `autoscaling:CompleteLifecycleAction` in its execution role. Without it,\n  the Lambda cannot release the instance — the #1 cause of stuck instances.\n\n- NEVER delete a lifecycle hook while instances are in `Pending:Wait` or\n  `Terminating:Wait` for that hook. Deleting strands those instances.\n\n- NEVER use a terminate hook with HeartbeatTimeout > 120 on a Spot ASG with\n  capacity rebalance. The Spot 2-minute interruption notice force-terminates\n  regardless of hook state.\n\n- NEVER configure `deregistration_delay.timeout_seconds` higher than the\n  terminate hook HeartbeatTimeout. The instance is terminated before drain\n  completes.\n\n- NEVER set `DefaultResult: ABANDON` on a launch hook without a replacement\n  strategy. ABANDON terminates on timeout and the ASG launches a\n  replacement — which fires the same hook. Broken bootstrap = launch loop.\n  Use CONTINUE (fail-open).\n\n- NEVER set `HealthCheckGracePeriod` shorter than the launch hook\n  HeartbeatTimeout with `HealthCheckType: ELB`. The ELB health check runs\n  on an instance still in `Pending:Wait`, marks it unhealthy, ASG replaces.\n\n- NEVER assume warm pool instances skip the launch lifecycle hook. They\n  enter `Pending:Wait` when claimed — the hook fires. The Lambda must\n  handle warm-pool-sourced instances.\n\n- NEVER set `MaxGroupPreparedCapacity` below `PoolMinSize` — invalid,\n  `put-warm-pool` returns `ValidationError`.\n\n- NEVER use `enter-standby` without specifying\n  `ShouldDecrementDesiredCapacity`. Without it the ASG launches a\n  replacement for the standby instance.\n\n- NEVER assume `set-instance-protection` protects against Spot\n  interruptions. Protection only prevents ASG-initiated scale-in. Spot\n  interruptions and capacity rebalance bypass it.\n\n- NEVER create multiple hooks with long HeartbeatTimeouts on the same\n  transition without calculating the total. Two 300s hooks = up to 600s in\n  `Pending:Wait`.\n\n- NEVER configure a lifecycle hook with no notification target. Without it,\n  no action receives the event, and the instance sits until HeartbeatTimeout.\n  This is a no-op hook that only adds latency.\n\n- NEVER assume the lifecycle event always contains `LifecycleActionToken`.\n  EventBridge retries or SNS misconfiguration may omit it. The Lambda\n  should handle missing tokens gracefully.\n\n- NEVER auto-execute a state-changing Auto Scaling CLI without the CONFIRM\n  gate. These operations have production-wide side effects.\n\n- NEVER use a lifecycle hook as a deployment mechanism. Hooks are for\n  instance-level initialization and drain, not application deployment. Use\n  CodeDeploy, SSM, or a deployment pipeline.\n\n## Pre-flight safety checks\n\n- **MANDATORY CONFIRMATION GATE.** Before any state-changing operation,\n  emit the CONFIRM prompt. Do NOT execute until confirmed.\n- **Capture pre-state for rollback.** Save `describe-lifecycle-hooks` and\n  `describe-auto-scaling-groups` output before changes.\n- **Verify Lambda state.** `get-function-configuration` — confirm `State:\n  Active` and `Timeout` >= expected action duration.\n- **Verify Lambda execution role.** Confirm\n  `autoscaling:CompleteLifecycleAction` on the ASG ARN.\n- **Verify notification target.** SNS: topic exists with confirmed\n  subscriptions. SQS: queue exists with policy allowing\n  `autoscaling.amazonaws.com`. Lambda: EventBridge invocation permission.\n- **Verify warm pool headroom.** `describe-subnets` for IP availability;\n  `get-service-quota` for vCPU limits.\n- **Verify capacity rebalance interaction.** If enabled, terminate hooks\n  must have HeartbeatTimeout \u003C= 120.\n- **Prefer additive changes.** Adding hooks, configuring warm pools, and\n  setting protection are reversible. Deleting a hook with active lifecycle\n  actions is destructive.\n\n## Recent AWS features (2024-2026)\n\nFeature notes moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\nLoad when deciding whether a recent feature changes the plan.\n\n## References (load on demand)\n\n- [references\u002Flifecycle-hook-patterns.md](references\u002Flifecycle-hook-patterns.md) — hook configuration matrix, notification targets, Lambda handler skeleton, IAM policies\n- [references\u002Fdiagnostic-procedures.md](references\u002Fdiagnostic-procedures.md) — stuck-instance diagnostic procedures, command quick-reference, live-account pre-flight\n- [references\u002Fworked-examples.md](references\u002Fworked-examples.md) — secondary worked example (diagnose-stuck, REVIEW_REQUIRED)\n- [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — Step-0 expert deep dive, recent AWS features\n\n## Domain\n\nAWS CloudOps \u002F EC2 Auto Scaling Lifecycle Hook Management, Warm Pool\nConfiguration, and Capacity Rebalance Integration.\n\n## AWS documentation\n\n- **Auto Scaling User Guide — Lifecycle hooks** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fautoscaling\u002Fec2\u002Fuserguide\u002Flifecycle-hooks.html\n- **Lifecycle hook overview** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fautoscaling\u002Fec2\u002Fuserguide\u002Flifecycle-hooks-overview.html\n- **Tutorial: Lambda lifecycle hook** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fautoscaling\u002Fec2\u002Fuserguide\u002Ftutorial-lifecycle-hook-lambda.html\n- **Warm pools** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fautoscaling\u002Fec2\u002Fuserguide\u002Fec2-auto-scaling-warm-pools.html\n- **Capacity rebalance** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fautoscaling\u002Fec2\u002Fuserguide\u002Fcapacity-rebalance.html\n- **Auto Scaling API Reference** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fautoscaling\u002Fec2\u002FAPIReference\u002FWelcome.html\n- **Auto Scaling CLI Reference** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fcli\u002Flatest\u002Freference\u002Fautoscaling\u002F\n- **Scheduled actions** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fautoscaling\u002Fec2\u002Fuserguide\u002Fschedule_time.html\n- **Target tracking scaling** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fautoscaling\u002Fec2\u002Fuserguide\u002Fas-scaling-target-tracking.html\n- **Instance protection** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fautoscaling\u002Fec2\u002Fuserguide\u002Fec2-auto-scaling-instance-protection.html\n","# Auto Scaling Lifecycle Hook Operator\n\n## What this skill does\n\nExecutes EC2 Auto Scaling lifecycle hook operations correctly and safely.\nRuns deterministic pre-checks before any state-changing CLI (hook existence,\nHeartbeatTimeout bounds, notification target ARN validity, IAM passrole for\nservice-linked role, Lambda complete-lifecycle-action grant, warm pool\ncapacity headroom, ELB target group health), executes the operation behind\na CONFIRM gate, and verifies the result by confirming the hook is active,\nlifecycle transitions complete within the expected window, and no instances\nremain stuck in `Pending:Wait` or `Terminating:Wait`.\n\n## Quick navigation\n\n| Section | What it covers | When to read it |\n|---|---|---|\n| **Quick reference** | Verdict thresholds + pre-check priority | Before any operation |\n| **Mindset** | Why lifecycle hooks extend the transition, the stuck-instance trap | Understanding the safety model |\n| **Pre-flight** | ASG metadata gate — hook config, warm pool state, notification targets | Before executing any CLI |\n| **Process** | Per-operation planning: add-hook, warm-pool, diagnose-stuck | When choosing which operation |\n| **Output format** | Structured OPERATION\u002FVERDICT\u002FPRE_CHECKS\u002FSTEPS template | Formatting the response |\n| **Anti-Patterns** | NEVER list — common mistakes that strand instances | Review before risky operations |\n\n## Quick reference — verdict thresholds\n\n| Verdict | Trigger condition | Action |\n|---|---|---|\n| `REVIEW_REQUIRED` | One or more pre-checks failed (hook missing required notification target, HeartbeatTimeout outside 30-7200s, Lambda lacks complete-lifecycle-action IAM grant, warm pool MaxGroupPreparedCapacity \u003C MinSize, capacity rebalance conflicts with lifecycle hook) | List failures, do NOT execute |\n| `OPERATION_COMPLETED` | Operation finished and post-verification passed (hook Active, lifecycle transition completed, warm pool at desired capacity, no instances stuck) | Emit verification results, monitoring plan |\n\n**Priority order for pre-checks (apply in this sequence):**\n\n1. **ASG existence and state** — group exists, not being deleted, has a\n   launch template\u002Fversion.\n2. **Hook configuration** — no conflicting hook with the same name.\n3. **HeartbeatTimeout bounds** — between 30 and 7200 seconds (default 3600).\n4. **Notification target validity** — SNS\u002FSQS\u002FLambda ARN exists and is\n   active. SNS\u002FSQS requires the ASG service-linked role to have\n   `sns:Publish` or `sqs:SendMessage`.\n5. **IAM passrole** — `AWSServiceRoleForAutoScaling` exists with required\n   permissions.\n6. **Lambda complete-lifecycle-action grant** — lifecycle Lambda execution\n   role has `autoscaling:CompleteLifecycleAction` on the ASG ARN.\n7. **Warm pool capacity** — `MaxGroupPreparedCapacity` >= `MinSize` and \u003C=\n   ASG `MaxSize`.\n8. **ELB integration** — target group deregistration delay compatible with\n   terminate hook HeartbeatTimeout.\n9. **Capacity rebalance** — if enabled, terminate hooks must complete within\n   the Spot 2-minute rebalance window.\n\n**Time baselines (2026):**\n\n- Launch hook: adds `HeartbeatTimeout` seconds to `Pending:Wait` ->\n  `InService`. With 300s hook and 60s bootstrap, total is 300s (bootstrap\n  runs within the wait window).\n- Terminate hook: adds `HeartbeatTimeout` seconds to `Terminating:Wait` ->\n  `Terminated`. ELB deregistration drain runs concurrently with the hook.\n- Warm pool: pre-booted `Stopped` instances resume to `Running` in ~10-30s\n  (vs. 60-120s cold launch).\n- Capacity rebalance: rebalance recommendation + 2-min interruption notice\n  gives ~4 min total; terminate hook must complete within this window.\n\n## Mindset\n\n**One-line takeaway:** A lifecycle hook extends the instance state\ntransition by `HeartbeatTimeout` seconds. During this window, the instance\nstays in `Pending:Wait` or `Terminating:Wait` and the action Lambda must\ncall `complete-lifecycle-action` before the timeout expires or the\n`DefaultResult` (CONTINUE or ABANDON) determines the outcome.\n\n- **A lifecycle hook is a timer, not a gate.** The hook gives a window to\n  do work (bootstrap, drain) but does not block forever. If the Lambda\n  never calls `complete-lifecycle-action`, the hook expires after\n  `HeartbeatTimeout` and `DefaultResult` fires: CONTINUE (proceed) or\n  ABANDON (for launch: terminate and replace; for terminate: terminate\n  anyway). A Lambda that silently fails without completing is the #1 cause\n  of stuck instances.\n\n- **Warm pool changes the scale-out math.** Without a warm pool, a new\n  instance takes 60-120 seconds (AMI boot + userdata + app startup). With\n  a warm pool, pre-booted `Stopped` instances resume to `Running` in 10-30\n  seconds. But the launch lifecycle hook still fires on every transition\n  from warm pool to the ASG — the hook Lambda must handle warm-pool-\n  sourced instances (they already have the OS booted).\n\n- **Capacity rebalance + terminate hook is a race against the Spot clock.**\n  When Spot capacity is at risk, EC2 sends a rebalance recommendation\n  followed by a 2-minute interruption notice. The ASG (with capacity\n  rebalance) launches a replacement and starts draining the old instance\n  via the terminate hook. The terminate hook HeartbeatTimeout must be short\n  enough to complete within the interruption window (default 3600s is too\n  long for Spot — use 30-120s).\n\n## Pre-flight: ASG metadata gate\n\nRun before classification. Misclassifying these produces wrong plans.\n\n**Pagination:** `describe-auto-scaling-groups` paginates at 50\u002Fpage.\n`describe-lifecycle-hooks` returns all hooks in one call. `describe-warm-\npool` paginates at 100 instances\u002Fpage.\n\nLive-account pre-flight commands moved to [references\u002Fdiagnostic-procedures.md](references\u002Fdiagnostic-procedures.md).\nLoad that file before executing against a live account.\n\n**Malformed input:** emit `VERDICT: ERROR` with `REASON: ASG\u002Foperation\nconfiguration is not valid JSON or is missing required fields` and\n`REMEDIATION: Re-fetch with aws autoscaling describe-auto-scaling-groups\n--auto-scaling-group-names \u003Cname> --output json`.\n\n| ASG attribute | Effect on operation |\n|---|---|\n| ASG not found | All operations BLOCKED. |\n| `MixedInstancesPolicy` with Spot | Capacity rebalance likely enabled; terminate hooks must be short (30-120s). |\n| No lifecycle hooks configured | Add-hook operations proceed; diagnose-stuck returns \"no hooks\". |\n| Existing hook with same name | Add-hook BLOCKED; use modify-hook. |\n| `HeartbeatTimeout` outside 30-7200 | Invalid; put-lifecycle-hook will fail. |\n| `NotificationTargetARN` null or invalid | Lambda never invoked; hook is a no-op timer. |\n| Warm pool `MaxGroupPreparedCapacity` \u003C `PoolMinSize` | Invalid configuration. |\n| `TargetGroupARNs` present | ELB deregistration delay interacts with terminate hook timeout. |\n| `HealthCheckType: ELB` with short `HealthCheckGracePeriod` | Launch hook must complete before grace period or ELB marks instance unhealthy. |\n| `CapacityRebalance: true` | Terminate hook fires on rebalance + interruption; must complete within Spot 2-min notice. |\n\n## Process — operation planning (apply in order)\n\n### Step 0: Expert knowledge — non-obvious Auto Scaling lifecycle behaviors\n\nDeep dive moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md)\n(Step 0: non-obvious lifecycle behaviors) — load before complex hook\u002Fwarm-pool decisions.\n\n### Step 1: Pre-check gate — REVIEW_REQUIRED if any check fails\n\n**For ALL operations:** ASG exists, has a launch template, not being\ndeleted.\n\n**For add-launch-hook:** No existing hook with same name.\n`HeartbeatTimeout` in [30, 7200]. `DefaultResult` is CONTINUE or ABANDON.\n`NotificationTargetARN` is valid and active. If SNS\u002FSQS: service-linked\nrole has `sns:Publish` or `sqs:SendMessage`. If Lambda: execution role has\n`autoscaling:CompleteLifecycleAction`. If ELB: `HealthCheckGracePeriod`\n>= expected bootstrap duration. `RoleARN` has trust policy for\n`autoscaling.amazonaws.com`.\n\n**For add-terminate-hook:** Same as launch plus: if capacity rebalance\nenabled, `HeartbeatTimeout` \u003C= 120. If ELB target groups:\n`deregistration_delay.timeout_seconds` \u003C= `HeartbeatTimeout`.\n\n**For modify-hook:** Hook exists. New `HeartbeatTimeout` in [30, 7200].\nNew notification target passes validity checks.\n\n**For delete-hook:** Hook exists. No instances currently in\n`Pending:Wait` or `Terminating:Wait` for this hook.\n\n**For configure-warm-pool:** `PoolMinSize` >= 0.\n`MaxGroupPreparedCapacity` >= `PoolMinSize` and \u003C= ASG `MaxSize`.\n`DesiredCapacity` + `PoolMinSize` does not exceed account vCPU limits or\nsubnet IP availability. Launch template supports Stop\u002FStart.\n\n**For set-protection:** Instances are members of the ASG and `InService`.\n\n**For enter-standby \u002F exit-standby:** Instances are members; for enter:\n`InService` with `ShouldDecrementDesiredCapacity` specified; for exit: in\n`Standby`.\n\n**For add-scheduled-action:** No existing action with same name. `Recurrence`\nis valid cron. `MinSize` \u003C= `DesiredCapacity` \u003C= `MaxSize`.\n\n**For add-scaling-policy:** No existing policy with same name. Target\ntracking: `TargetValue` > 0. Step scaling: alarm exists or will be created.\n\n**For enable-capacity-rebalance:** ASG has Spot instances. Existing\nterminate hooks have `HeartbeatTimeout` \u003C= 120.\n\n**For diagnose-stuck (read-only):** Read hook state, CloudWatch Logs, and\nthe stuck-instance table to identify root cause.\n\n**Stuck-instance failure-mode table:**\n\n| Symptom | Root cause | Fix |\n|---|---|---|\n| `Pending:Wait` > HeartbeatTimeout | Lambda never called complete-lifecycle-action | Check Lambda logs; call complete manually |\n| `Pending:Wait`, Lambda `AccessDenied` on `CompleteLifecycleAction` | Lambda role missing permission | Add `autoscaling:CompleteLifecycleAction` to role |\n| `Terminating:Wait` > HeartbeatTimeout | Same as above for terminate | Same fix |\n| `Pending:Wait`, Lambda never invoked | EventBridge rule missing or SNS unconfirmed | Check rule pattern; confirm SNS subscription |\n| `Pending:Wait`, event missing `LifecycleActionToken` | EventBridge rule wrong detail type | Match `EC2 Instance-launch Lifecycle Action` |\n| Warm pool instance stuck in `Pending:Wait` | Lambda not designed for warm pool | Update Lambda to detect warm-pool instances |\n| Instance terminated despite terminate hook | Spot force-kill; HeartbeatTimeout was 3600s | Reduce to \u003C= 120 for Spot ASGs |\n| `put-lifecycle-hook` `ValidationError` | HeartbeatTimeout outside 30-7200 or malformed ARN | Correct parameters |\n| Multiple hooks, instance stuck between hooks | Each hook must complete before next | Reduce hooks or shorten timeouts |\n\n### Step 2: READY — emit operation plan\n\nIf all pre-checks pass, emit `VERDICT: READY` with the exact CLI sequence\nand CONFIRM gate. The plan includes the exact CLI command, expected\nduration, side-effects, CONFIRM prompt, and monitoring step.\n\n### Step 3: Execute behind CONFIRM gate\n\n- **MANDATORY CONFIRMATION GATE.** Before any state-changing CLI\n  (`put-lifecycle-hook`, `delete-lifecycle-hook`, `complete-lifecycle-\n  action`, `put-warm-pool`, `set-instance-protection`, `enter-standby`,\n  `exit-standby`, `put-scheduled-action`, `put-scaling-policy`,\n  `update-auto-scaling-group`), emit `CONFIRM: About to \u003Coperation> on\n  \u003Casg-name> in account \u003Caccount> region \u003Cregion>. This will\n  \u003Cconsequence>. Proceed? (yes\u002Fno)`.\n- Capture pre-state: `describe-lifecycle-hooks` and `describe-auto-scaling-\n  groups` output saved to `\u002Ftmp\u002F\u003Casg>-*-$(date +%s).json`.\n- Execute the CLI. For `put-lifecycle-hook`, the hook is immediately active.\n- For hooks with a Lambda: `aws logs tail \u002Faws\u002Flambda\u002F\u003Clifecycle-lambda>\n  --follow --since 5m`.\n\n### Step 4: Post-verification — OPERATION_COMPLETED\n\nALL checks must pass for `OPERATION_COMPLETED`:\n1. `describe-lifecycle-hooks` confirms hook with correct configuration.\n2. For add\u002Fmodify-hook: test scale-out confirms instance enters\n   `Pending:Wait`, Lambda fires, transitions to `InService`.\n3. For configure-warm-pool: `describe-warm-pool` confirms correct\n   `PoolMinSize`, `MaxGroupPreparedCapacity`, instances present.\n4. For set-protection\u002Fstandby: confirm instance state via\n   `describe-auto-scaling-groups`.\n5. CloudWatch shows no lifecycle timeout errors (15-min sample).\n\nIf ANY verification fails, emit `VERDICT: ERROR` — route to diagnose-stuck.\n\n## Output format (per operation)\n\n```text\nOPERATION: \u003Cadd-launch-hook | add-terminate-hook | modify-hook | delete-hook | configure-warm-pool | set-protection | enter-standby | exit-standby | add-scheduled-action | add-scaling-policy | enable-capacity-rebalance | diagnose-stuck>\nVERDICT: OPERATION_COMPLETED | REVIEW_REQUIRED\nTARGET: \u003Casg-name> (hook: \u003Chook-name-or-\"none\">)\nPRE_CHECKS:\n  - [PASS] \u003Ccheck description>\n  - [FAIL] \u003Ccheck description> — \u003Creason>\nSTEPS:\n  1. \u003CCLI command with flags populated>\n  2. \u003Cwait \u002F monitoring command>\nPOST_VERIFY:\n  - [PASS] \u003Cverification description>\nNOTES: \u003Cmonitoring, caveats, warm pool state>\n```\n\n### Worked example — add-launch-hook (bootstrap registration)\n\n```text\nOPERATION: add-launch-hook\nVERDICT: OPERATION_COMPLETED\nTARGET: prod-web-asg (hook: web-bootstrap-hook)\nPRE_CHECKS:\n  - [PASS] ASG exists, DesiredCapacity: 4, MaxSize: 20\n  - [PASS] No existing hook named web-bootstrap-hook\n  - [PASS] HeartbeatTimeout: 300 (in [30, 7200])\n  - [PASS] DefaultResult: CONTINUE\n  - [PASS] Lambda web-lifecycle-action State: Active\n  - [PASS] Lambda role has autoscaling:CompleteLifecycleAction\n  - [PASS] HealthCheckGracePeriod: 600 >= bootstrap 120s\nSTEPS:\n  1. CONFIRM: About to add launch lifecycle hook web-bootstrap-hook\n     on prod-web-asg with HeartbeatTimeout 300s, DefaultResult CONTINUE,\n     Lambda web-lifecycle-action. New instances enter Pending:Wait for\n     up to 300s during bootstrap. Proceed? (yes\u002Fno)\n  2. aws autoscaling put-lifecycle-hook \\\n       --lifecycle-hook-name web-bootstrap-hook \\\n       --auto-scaling-group-name prod-web-asg \\\n       --lifecycle-transition autoscaling:EC2_INSTANCE_LAUNCHING \\\n       --heartbeat-timeout 300 \\\n       --default-result CONTINUE \\\n       --notification-target-arn arn:aws:lambda:us-east-1:111111111111:function:web-lifecycle-action\nPOST_VERIFY:\n  - [PASS] describe-lifecycle-hooks: web-bootstrap-hook active\n  - [INFO] Test scale-out: instance entered Pending:Wait, Lambda invoked,\n    transitioned to InService in 87s\nNOTES:\n  - If Lambda crashes, instance stays in Pending:Wait for 300s, then\n    DefaultResult CONTINUE fires. Monitor Lambda errors.\n  - For warm-pool instances, Lambda detects already-booted OS and\n    skips AMI-level bootstrap.\n```\n\n### Worked example — diagnose-stuck (REVIEW_REQUIRED)\n\nFull example moved to [references\u002Fworked-examples.md](references\u002Fworked-examples.md).\nLoad it when formatting a diagnose-stuck REVIEW_REQUIRED response.\n\n## Anti-Patterns — NEVER\n\n- NEVER set HeartbeatTimeout to 3600 (the default) without calculating the\n  expected action duration. Set to 2-3x the expected bootstrap\u002Fdrain time.\n\n- NEVER deploy a lifecycle Lambda without\n  `autoscaling:CompleteLifecycleAction` in its execution role. Without it,\n  the Lambda cannot release the instance — the #1 cause of stuck instances.\n\n- NEVER delete a lifecycle hook while instances are in `Pending:Wait` or\n  `Terminating:Wait` for that hook. Deleting strands those instances.\n\n- NEVER use a terminate hook with HeartbeatTimeout > 120 on a Spot ASG with\n  capacity rebalance. The Spot 2-minute interruption notice force-terminates\n  regardless of hook state.\n\n- NEVER configure `deregistration_delay.timeout_seconds` higher than the\n  terminate hook HeartbeatTimeout. The instance is terminated before drain\n  completes.\n\n- NEVER set `DefaultResult: ABANDON` on a launch hook without a replacement\n  strategy. ABANDON terminates on timeout and the ASG launches a\n  replacement — which fires the same hook. Broken bootstrap = launch loop.\n  Use CONTINUE (fail-open).\n\n- NEVER set `HealthCheckGracePeriod` shorter than the launch hook\n  HeartbeatTimeout with `HealthCheckType: ELB`. The ELB health check runs\n  on an instance still in `Pending:Wait`, marks it unhealthy, ASG replaces.\n\n- NEVER assume warm pool instances skip the launch lifecycle hook. They\n  enter `Pending:Wait` when claimed — the hook fires. The Lambda must\n  handle warm-pool-sourced instances.\n\n- NEVER set `MaxGroupPreparedCapacity` below `PoolMinSize` — invalid,\n  `put-warm-pool` returns `ValidationError`.\n\n- NEVER use `enter-standby` without specifying\n  `ShouldDecrementDesiredCapacity`. Without it the ASG launches a\n  replacement for the standby instance.\n\n- NEVER assume `set-instance-protection` protects against Spot\n  interruptions. Protection only prevents ASG-initiated scale-in. Spot\n  interruptions and capacity rebalance bypass it.\n\n- NEVER create multiple hooks with long HeartbeatTimeouts on the same\n  transition without calculating the total. Two 300s hooks = up to 600s in\n  `Pending:Wait`.\n\n- NEVER configure a lifecycle hook with no notification target. Without it,\n  no action receives the event, and the instance sits until HeartbeatTimeout.\n  This is a no-op hook that only adds latency.\n\n- NEVER assume the lifecycle event always contains `LifecycleActionToken`.\n  EventBridge retries or SNS misconfiguration may omit it. The Lambda\n  should handle missing tokens gracefully.\n\n- NEVER auto-execute a state-changing Auto Scaling CLI without the CONFIRM\n  gate. These operations have production-wide side effects.\n\n- NEVER use a lifecycle hook as a deployment mechanism. Hooks are for\n  instance-level initialization and drain, not application deployment. Use\n  CodeDeploy, SSM, or a deployment pipeline.\n\n## Pre-flight safety checks\n\n- **MANDATORY CONFIRMATION GATE.** Before any state-changing operation,\n  emit the CONFIRM prompt. Do NOT execute until confirmed.\n- **Capture pre-state for rollback.** Save `describe-lifecycle-hooks` and\n  `describe-auto-scaling-groups` output before changes.\n- **Verify Lambda state.** `get-function-configuration` — confirm `State:\n  Active` and `Timeout` >= expected action duration.\n- **Verify Lambda execution role.** Confirm\n  `autoscaling:CompleteLifecycleAction` on the ASG ARN.\n- **Verify notification target.** SNS: topic exists with confirmed\n  subscriptions. SQS: queue exists with policy allowing\n  `autoscaling.amazonaws.com`. Lambda: EventBridge invocation permission.\n- **Verify warm pool headroom.** `describe-subnets` for IP availability;\n  `get-service-quota` for vCPU limits.\n- **Verify capacity rebalance interaction.** If enabled, terminate hooks\n  must have HeartbeatTimeout \u003C= 120.\n- **Prefer additive changes.** Adding hooks, configuring warm pools, and\n  setting protection are reversible. Deleting a hook with active lifecycle\n  actions is destructive.\n\n## Recent AWS features (2024-2026)\n\nFeature notes moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\nLoad when deciding whether a recent feature changes the plan.\n\n## References (load on demand)\n\n- [references\u002Flifecycle-hook-patterns.md](references\u002Flifecycle-hook-patterns.md) — hook configuration matrix, notification targets, Lambda handler skeleton, IAM policies\n- [references\u002Fdiagnostic-procedures.md](references\u002Fdiagnostic-procedures.md) — stuck-instance diagnostic procedures, command quick-reference, live-account pre-flight\n- [references\u002Fworked-examples.md](references\u002Fworked-examples.md) — secondary worked example (diagnose-stuck, REVIEW_REQUIRED)\n- [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — Step-0 expert deep dive, recent AWS features\n\n## Domain\n\nAWS CloudOps \u002F EC2 Auto Scaling Lifecycle Hook Management, Warm Pool\nConfiguration, and Capacity Rebalance Integration.\n\n## AWS documentation\n\n- **Auto Scaling User Guide — Lifecycle hooks** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fautoscaling\u002Fec2\u002Fuserguide\u002Flifecycle-hooks.html\n- **Lifecycle hook overview** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fautoscaling\u002Fec2\u002Fuserguide\u002Flifecycle-hooks-overview.html\n- **Tutorial: Lambda lifecycle hook** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fautoscaling\u002Fec2\u002Fuserguide\u002Ftutorial-lifecycle-hook-lambda.html\n- **Warm pools** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fautoscaling\u002Fec2\u002Fuserguide\u002Fec2-auto-scaling-warm-pools.html\n- **Capacity rebalance** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fautoscaling\u002Fec2\u002Fuserguide\u002Fcapacity-rebalance.html\n- **Auto Scaling API Reference** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fautoscaling\u002Fec2\u002FAPIReference\u002FWelcome.html\n- **Auto Scaling CLI Reference** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fcli\u002Flatest\u002Freference\u002Fautoscaling\u002F\n- **Scheduled actions** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fautoscaling\u002Fec2\u002Fuserguide\u002Fschedule_time.html\n- **Target tracking scaling** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fautoscaling\u002Fec2\u002Fuserguide\u002Fas-scaling-target-tracking.html\n- **Instance protection** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fautoscaling\u002Fec2\u002Fuserguide\u002Fec2-auto-scaling-instance-protection.html\n",{"name":5,"license":15,"metadata":24,"description":7,"compatibility":43},{"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,"when_not_to_use":39,"lifecycle_status":40,"invocation_schema":41,"supports_pipeline":37,"activation_triggers":42},"aws, autoscaling, compute, lifecycle, ec2, warm-pool, spot, elb, lambda, eventbridge, operate","4","Jacky Chan — AWS Community Builder","aws-cloudops","Compute","0.1.0","Auto Scaling, lifecycle hook, launch lifecycle hook, terminate lifecycle hook, HeartbeatTimeout, DefaultResult, CONTINUE, ABANDON, complete-lifecycle-action, record-lifecycle-action-heartbeat, pending:wait, Pending:Wait, Terminating:Wait, InService, warm pool, warm pool MinSize, MaxGroupPreparedCapacity, warm pool state, capacity rebalance, instance protection, standby, EnterStandby, ExitStandby, graceful drain, ELB deregistration, target group deregistration, connection drain, session drain, scheduled action, scaling policy, CloudWatch alarm, step scaling, target tracking, Spot Instance Interruption, SNS notification, SQS notification, EventBridge, lifecycle Lambda, bootstrap registration","operate","high","false","capability","Adding or modifying launch\u002Fterminate lifecycle hooks, debugging stuck lifecycle instances (pending:wait or terminating:wait), configuring warm pools for faster scale-out, wiring graceful-drain Lambdas for ELB deregistration and session drain, setting instance protection or standby state, integrating capacity rebalance with Spot interruptions, creating scheduled actions or CloudWatch alarm-based scaling policies, or routing lifecycle notifications to SNS\u002FSQS\u002FLambda.","true","OPERATION_COMPLETED | REVIEW_REQUIRED","EC2 instance-level OS patching or application deployment (use an SSM or CodeDeploy skill), ECS\u002FFargate service autoscaling (use an ECS autoscaling skill), Auto Scaling group creation from scratch (use a provisioning skill), or cost optimization of EC2 fleets (use an EC2 rightsizing skill). This skill focuses on lifecycle hook operations and warm pool management, not fleet provisioning or cost optimization.","active","Input: either (a) an Auto Scaling group configuration (describe-auto- scaling-groups output) plus the intended operation (add-launch-hook, add-terminate-hook, modify-hook, delete-hook, configure-warm-pool, set-protection, enter-standby, exit-standby, add-scheduled-action, add-scaling-policy, enable-capacity-rebalance, diagnose-stuck), OR (b) an ASG name + operation for live-account execution. Output: a deterministic OPERATION \u002F VERDICT \u002F PRE_CHECKS \u002F STEPS \u002F POST_VERIFY \u002F NOTES block per lifecycle operation, where VERDICT is one of OPERATION_COMPLETED, REVIEW_REQUIRED.","add lifecycle hook, launch lifecycle hook, terminate lifecycle hook, lifecycle hook timeout, HeartbeatTimeout, complete-lifecycle-action, stuck lifecycle instance, pending wait stuck, terminating wait stuck, warm pool configuration, warm pool MinSize, capacity rebalance, graceful drain, ELB deregistration lifecycle, session drain, instance protection, standby state, enter standby, exit standby, scheduled action autoscaling, scaling policy, CloudWatch alarm scaling, Spot interruption lifecycle, SNS lifecycle notification, SQS lifecycle notification, EventBridge lifecycle, lifecycle Lambda, bootstrap on launch","Agent runtime that reads SKILL.md (Claude Code, Cursor, Windsurf, Codex, Gemini). No AWS CLI required for offline plan classification. Live-account operations use aws autoscaling describe-lifecycle-hooks, put-lifecycle- hook, delete-lifecycle-hook, complete-lifecycle-action, record-lifecycle- action-heartbeat, describe-warm-pool, put-warm-pool, describe-auto- scaling-groups, update-auto-scaling-group, set-instance-protection, enter-standby, exit-standby, put-scheduled-action...","main","eeace51bd5dd1db2030729d83eeab988861553aa","skills\u002Fautoscaling-lifecycle-operator",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":53,"prompt":63,"zipAvailable":64},[54,57,60],{"tool":55,"command":56},"npx","npx skills add jhkchan\u002Faws-agent-skills --skill autoscaling-lifecycle-operator",{"tool":58,"command":59},"bunx","bunx skills add jhkchan\u002Faws-agent-skills --skill autoscaling-lifecycle-operator",{"tool":61,"command":62},"pnpm","pnpm dlx skills add jhkchan\u002Faws-agent-skills --skill autoscaling-lifecycle-operator","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fautoscaling-lifecycle-operator\u002FSKILL.md",true,[66,72,76,80,84,88,92,96,100,104,108,112,116,120,124,128,132,136,140],{"path":67,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":70,"sourceHtmlUrl":71},"eval\u002Ftest-cases.yaml","REFERENCE","参考文档",8263,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fautoscaling-lifecycle-operator\u002Feval\u002Ftest-cases.yaml",{"path":73,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":74,"sourceHtmlUrl":75},"evals\u002Fbaselines\u002Fcapacity-rebalance-enable-completed.md",529,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fautoscaling-lifecycle-operator\u002Fevals\u002Fbaselines\u002Fcapacity-rebalance-enable-completed.md",{"path":77,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":78,"sourceHtmlUrl":79},"evals\u002Fbaselines\u002Fdiagnose-stuck-pending-wait-review-required.md",724,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fautoscaling-lifecycle-operator\u002Fevals\u002Fbaselines\u002Fdiagnose-stuck-pending-wait-review-required.md",{"path":81,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":82,"sourceHtmlUrl":83},"evals\u002Fbaselines\u002Flaunch-hook-bootstrap-ready.md",670,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fautoscaling-lifecycle-operator\u002Fevals\u002Fbaselines\u002Flaunch-hook-bootstrap-ready.md",{"path":85,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":86,"sourceHtmlUrl":87},"evals\u002Fbaselines\u002Fterminate-hook-spot-timeout-review-required.md",716,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fautoscaling-lifecycle-operator\u002Fevals\u002Fbaselines\u002Fterminate-hook-spot-timeout-review-required.md",{"path":89,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":90,"sourceHtmlUrl":91},"evals\u002Fbaselines\u002Fwarm-pool-fast-scale-out-completed.md",474,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fautoscaling-lifecycle-operator\u002Fevals\u002Fbaselines\u002Fwarm-pool-fast-scale-out-completed.md",{"path":93,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":94,"sourceHtmlUrl":95},"evals\u002Feval_config.yaml",1979,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fautoscaling-lifecycle-operator\u002Fevals\u002Feval_config.yaml",{"path":97,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":98,"sourceHtmlUrl":99},"evals\u002Fevals.json",4522,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fautoscaling-lifecycle-operator\u002Fevals\u002Fevals.json",{"path":101,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":102,"sourceHtmlUrl":103},"evals\u002Fprompts\u002Fcapacity-rebalance-enable-completed.md",928,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fautoscaling-lifecycle-operator\u002Fevals\u002Fprompts\u002Fcapacity-rebalance-enable-completed.md",{"path":105,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":106,"sourceHtmlUrl":107},"evals\u002Fprompts\u002Fdiagnose-stuck-pending-wait-review-required.md",1095,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fautoscaling-lifecycle-operator\u002Fevals\u002Fprompts\u002Fdiagnose-stuck-pending-wait-review-required.md",{"path":109,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":110,"sourceHtmlUrl":111},"evals\u002Fprompts\u002Flaunch-hook-bootstrap-ready.md",1287,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fautoscaling-lifecycle-operator\u002Fevals\u002Fprompts\u002Flaunch-hook-bootstrap-ready.md",{"path":113,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":114,"sourceHtmlUrl":115},"evals\u002Fprompts\u002Fterminate-hook-spot-timeout-review-required.md",793,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fautoscaling-lifecycle-operator\u002Fevals\u002Fprompts\u002Fterminate-hook-spot-timeout-review-required.md",{"path":117,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":118,"sourceHtmlUrl":119},"evals\u002Fprompts\u002Fwarm-pool-fast-scale-out-completed.md",883,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fautoscaling-lifecycle-operator\u002Fevals\u002Fprompts\u002Fwarm-pool-fast-scale-out-completed.md",{"path":121,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":122,"sourceHtmlUrl":123},"examples\u002FREADME.md",5999,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fautoscaling-lifecycle-operator\u002Fexamples\u002FREADME.md",{"path":125,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":126,"sourceHtmlUrl":127},"references\u002Fadvanced-patterns.md",5498,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fautoscaling-lifecycle-operator\u002Freferences\u002Fadvanced-patterns.md",{"path":129,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":130,"sourceHtmlUrl":131},"references\u002Fdiagnostic-procedures.md",12862,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fautoscaling-lifecycle-operator\u002Freferences\u002Fdiagnostic-procedures.md",{"path":133,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":134,"sourceHtmlUrl":135},"references\u002Flifecycle-hook-patterns.md",12057,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fautoscaling-lifecycle-operator\u002Freferences\u002Flifecycle-hook-patterns.md",{"path":137,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":138,"sourceHtmlUrl":139},"references\u002Fworked-examples.md",1116,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fautoscaling-lifecycle-operator\u002Freferences\u002Fworked-examples.md",{"path":141,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":142,"sourceHtmlUrl":143},"skill.usf.yaml",4630,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fautoscaling-lifecycle-operator\u002Fskill.usf.yaml",[145,152,159,166,173,180],{"skillNo":146,"name":147,"nameZh":6,"description":148,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":149,"categories":150,"keywords":151,"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":153,"name":154,"nameZh":6,"description":155,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":156,"categories":157,"keywords":158,"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":160,"name":161,"nameZh":6,"description":162,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":163,"categories":164,"keywords":165,"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":167,"name":168,"nameZh":6,"description":169,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":170,"categories":171,"keywords":172,"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":174,"name":175,"nameZh":6,"description":176,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":177,"categories":178,"keywords":179,"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":181,"name":182,"nameZh":6,"description":183,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":184,"categories":185,"keywords":186,"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",[],[]]