[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7A9H7704M62KC034ZXGAYGD":3,"skill-same:01M7A9H7704M62KC034ZXGAYGD":151},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":46,"repositoryHtmlUrl":47,"repositoryHomepageUrl":6,"ownerHtmlUrl":48,"ownerBlogUrl":6,"ownerDescription":49,"updatedAt":50,"install":51,"resources":64},"01M7A9H7704M62KC034ZXGAYGD","kms-key-rotation-operator",null,"Operates AWS KMS key rotation workflows end-to-end — key type classification (AWS-managed, customer-managed symmetric, asymmetric RSA\u002FECDSA, HMAC, Multi-Region primary\u002Freplica, custom key store \u002F CloudHSM), automatic annual backing-key rotation enablement and verification, manual key rotation (create new CMK + re-encrypt), cryptographic material lifecycle (old material retained for decrypt, new encrypts transparently), and diagnostic loops (describe-key, get-key-rotation-status, CloudTrail EnableKeyRotation events, list-grants, key-policy diff). Runs deterministic pre-checks (key Enabled, key state not PendingDeletion, symmetric SYMMETRIC_DEFAULT usage, multi-Region primary not replica, EnableKeyRotation permission in key policy) behind a CONFIRM gate and emits a READY, BLOCKED, or COMPLETED verdict per rotation. Use when enabling automatic rotation, verifying rotation ran, planning a manual rotation, or diagnosing why rotation cannot be enabled.","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\u002Fkms-key-rotation-operator\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: kms-key-rotation-operator\ndescription: Operates AWS KMS key rotation workflows end-to-end — key type classification (AWS-managed, customer-managed symmetric, asymmetric RSA\u002FECDSA, HMAC, Multi-Region primary\u002Freplica, custom key store \u002F CloudHSM), automatic annual backing-key rotation enablement and verification, manual key rotation (create new CMK + re-encrypt), cryptographic material lifecycle (old material retained for decrypt, new encrypts transparently), and diagnostic loops (describe-key, get-key-rotation-status, CloudTrail EnableKeyRotation events, list-grants, key-policy diff). Runs deterministic pre-checks (key Enabled, key state not PendingDeletion, symmetric SYMMETRIC_DEFAULT usage, multi-Region primary not replica, EnableKeyRotation permission in key policy) behind a CONFIRM gate and emits a READY, BLOCKED, or COMPLETED verdict per rotation. Use when enabling automatic rotation, verifying rotation ran, planning a manual rotation, or diagnosing why rotation cannot be enabled.\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 kms describe-key, get-key-rotation- status, enable-key-rotation, disable-key-rotation, list-grants, get-key-policy, list-resource-tags, aws cloudtrail lookup-events (AWS CLI v2, SSO or key-based credentials).\nmetadata:\n  domain: aws-cloudops\n  complexity: medium\n  requires_llm: 'true'\n  phase: '4'\n  supports_pipeline: 'true'\n  entry_point: 'false'\n  family: Security\n  task_type: operate\n  skill_class: capability\n  lifecycle_status: active\n  verdict_shape: READY | BLOCKED | COMPLETED\n  when_to_use: Enabling automatic backing-key rotation on a customer-managed KMS key, verifying a key's rotation status and last rotation date, planning a manual rotation for asymmetric\u002FHMAC keys that do not support automatic rotation, diagnosing why EnableKeyRotation fails (Disabled\u002FPendingDeletion key, asymmetric usage, replica key, missing key-policy permission), confirming CloudTrail EnableKeyRotation events, or validating cryptographic-agility posture across a fleet of CMKs.\n  activation_triggers: enable KMS key rotation, rotate KMS key, verify key rotation, GetKeyRotationStatus, EnableKeyRotation, automatic key rotation, manual key rotation, backing key, Multi-Region key rotation, replica key rotation, asymmetric key rotation, HMAC key rotation, re-encrypt with new key, cryptographic agility, KMS rotation failed\n  invocation_schema: 'Input: either (a) a KMS key configuration (describe-key output) plus the intended operation (enable-rotation, verify-rotation, disable-rotation, plan-manual-rotation, diagnose-rotation), OR (b) a key-id + operation for live-account execution. Output: deterministic OPERATION \u002F VERDICT \u002F PRE_CHECKS \u002F STEPS \u002F POST_VERIFY \u002F NOTES block per rotation, where VERDICT is one of READY, BLOCKED, COMPLETED.'\n  version: 0.1.0\n  author: Jacky Chan — AWS Community Builder\n  keywords: KMS, key rotation, backing key, cryptographic material, customer managed key, CMK, AWS managed key, Multi-Region key, replica key, asymmetric key, RSA_2048, ECC_NIST_P256, HMAC_256, SYMMETRIC_DEFAULT, EnableKeyRotation, GetKeyRotationStatus, CloudHSM custom key store, key policy, re-encrypt, cryptographic agility\n  tags: aws, kms, security, encryption, key-management, rotation, compliance, operate\n---\n\n# KMS Key Rotation Operator\n\n## What this skill does\n\nExecutes KMS key rotation operations correctly and safely. Runs\ndeterministic pre-checks before any state-changing CLI (key Enabled,\nnot PendingDeletion, symmetric SYMMETRIC_DEFAULT usage, Multi-Region\nprimary not replica, EnableKeyRotation permission in the key policy,\nnot a custom key store with external rotation), executes the\n`enable-key-rotation` \u002F `disable-key-rotation` CLI behind a CONFIRM\ngate, and verifies the result by confirming\n`get-key-rotation-status` returns `Enabled: true` and CloudTrail shows\nthe `EnableKeyRotation` event. Every enable-rotation produces a\ncryptographic-material lifecycle note (old backing material retained\nfor decrypt of existing ciphertext; new material encrypts all new\noperations transparently). Every asymmetric\u002FHMAC key plan routes to\nmanual rotation (create new key, update callers, re-encrypt) since\nautomatic rotation is not supported.\n\n## Quick navigation\n\n| Section | What it covers | When to read it |\n|---|---|---|\n| **§ Quick reference** | Verdict thresholds (BLOCKED\u002FREADY\u002FCOMPLETED) + pre-check priority | Before any operation |\n| **§ Mindset** | Why rotation is transparent, the asymmetric-gap, the confirm gate | Understanding the safety model |\n| **§ Pre-flight** | Key metadata gate — Enabled state, PendingDeletion, Multi-Region, custom key store | Before executing any CLI |\n| **§ Process** | Per-operation planning: enable, verify, disable, plan-manual, diagnose | When choosing which operation to run |\n| **§ Output format** | Structured OPERATION\u002FVERDICT\u002FPRE_CHECKS\u002FSTEPS\u002FPOST_VERIFY template | Formatting the response |\n| **§ Anti-Patterns** | NEVER list — common mistakes that break encryption or strand data | Review before risky operations |\n| **§ Pre-flight safety** | Capture pre-state, CloudTrail trail verification, key policy check | Defense-in-depth |\n\n## Quick reference — verdict thresholds\n\n| Verdict | Trigger condition | Action |\n|---|---|---|\n| `BLOCKED` | One or more pre-checks failed (key Disabled, key PendingDeletion, asymmetric\u002FHMAC usage with auto-rotation requested, replica key with auto-rotation requested, missing EnableKeyRotation permission, custom key store with external rotation) | List failures, do NOT execute |\n| `READY` | All pre-checks passed; awaiting CONFIRM gate | Emit exact CLI sequence, wait for operator yes |\n| `COMPLETED` | Rotation enable\u002Fdisable finished and post-verification passed (`get-key-rotation-status` matches intent, CloudTrail event present, key policy unchanged, applications using key ARN still work) | Emit verification results, monitoring plan |\n\n**Priority order for pre-checks (apply in this sequence, all must pass\nfor READY):**\n\n1. **Key reachability** — key exists (`describe-key` does not return\n   `NotFoundException`), `Enabled` true, `KeyState: Enabled`.\n2. **No deletion pending** — `KeyState` is NOT `PendingDeletion` (no\n   rotation during the deletion window).\n3. **Key supports automatic rotation** — `KeySpec` is\n   `SYMMETRIC_DEFAULT` (or `AES_256` for multi-Region primary) AND\n   `KeyUsage: ENCRYPT_DECRYPT` AND `Origin: AWS_KMS`. Asymmetric,\n   HMAC, and external-key-material keys do NOT support automatic\n   rotation.\n4. **Multi-Region primary** — for Multi-Region keys, rotation is\n   controlled by the primary key. A replica key\n   (`MultiRegionConfiguration.PrimaryArmy` != self) inherits the\n   primary's rotation status; `EnableKeyRotation` on a replica fails.\n5. **Key policy permission** — the calling identity must have\n   `kms:EnableKeyRotation` (or `kms:DisableKeyRotation`) on the key\n   ARN. The key's own resource-based policy must allow the caller, or\n   the caller's identity-based policy must grant it. Cross-account\n   callers need both sides.\n6. **Custom key store check** — for `Origin: AWS_CLOUDHSM`, rotation\n   is supported (KMS rotates the backing key in the CloudHSM cluster),\n  but the cluster must be `ACTIVE`. For `Origin: EXTERNAL`, rotation\n   is NOT supported (you manage the key material externally).\n7. **Schedule intent clarity** — `enable-key-rotation` accepts an\n   optional `--rotation-period-in-days` (7-365, default 365). Confirm\n   the intended cadence before enabling.\n\n**Cost\u002Ftime baselines (2026):**\n\n- Customer-managed CMK: $1.00\u002Fkey\u002Fmonth (regardless of rotation).\n- Automatic rotation: no additional per-rotation fee. The CMK keeps\n  its key ID and ARN; KMS retains old backing material for decrypt.\n- Asymmetric keys (RSA, ECC): $1.00\u002Fkey\u002Fmonth; do NOT support\n  automatic rotation. Manual rotation = create new key + update\n  callers + optional re-encrypt.\n- HMAC keys: $1.00\u002Fkey\u002Fmonth; do NOT support automatic rotation.\n- Multi-Region keys: $1.00 per primary + $1.00 per replica.\n- CloudTrail `EnableKeyRotation` \u002F `DisableKeyRotation` events: free\n  (management events).\n- Re-encryption cost (manual rotation): `$0.03` per 10,000\n  `Encrypt`\u002F`Decrypt` requests. Re-encrypting a large S3 bucket or\n  DynamoDB table is the dominant cost, not KMS itself.\n\n## Mindset\n\n**One-line takeaway:** automatic KMS key rotation is transparent to\napplications — the key ID and ARN do not change, and old backing\nmaterial is retained so existing ciphertext remains decryptable.\nDriven by three KMS realities:\n\n- **Rotation swaps backing material, not the key.** A KMS key is a\n  logical construct (key ID + ARN + policy) backed by cryptographic\n  material. Automatic rotation creates new backing material under the\n  same key ID. All new `Encrypt` operations use the new material; all\n  `Decrypt` operations on existing ciphertext use the material that\n  originally encrypted it (KMS tracks which material produced each\n  ciphertext via the encryption context). Applications see no change.\n\n- **Asymmetric and HMAC keys are the rotation blind spot.** Automatic\n  rotation is supported ONLY on symmetric ENCRYPT_DECRYPT keys with\n  `Origin: AWS_KMS` (and CloudHSM-backed symmetric keys). RSA, ECDSA,\n  HMAC, and external-material keys do NOT support automatic rotation.\n  For these, you must rotate manually: create a new key, update all\n  callers to use the new key ARN, and optionally re-encrypt old data.\n  This is a significant operational gap — auditors asking \"are all\n  keys rotating annually?\" need to be told that asymmetric keys are\n  manually rotated.\n\n- **A Multi-Region replica key's rotation is set on the primary.**\n  Calling `EnableKeyRotation` on a replica returns\n  `InvalidOperationException`. Multi-Region replica keys share the\n  same cryptographic material as the primary — when the primary's\n  backing material rotates, replicas receive the new material\n  automatically. Verify rotation on the primary's\n  `get-key-rotation-status`.\n\n## Pre-flight: key metadata gate\n\nRun before classification. Misclassifying these produces wrong plans.\n\nPagination + live-account pre-flight commands moved verbatim to\n`references\u002Fdiagnostic-commands.md` (load on demand).\n\n**Malformed input:** if the input JSON is invalid or missing required\nfields, emit `VERDICT: ERROR` with `REASON: Key configuration is not\nvalid JSON or is missing required fields — cannot plan.` and\n`REMEDIATION: Re-fetch with aws kms describe-key --key-id \u003Cid> --output\njson and re-plan.`\n\n| Key attribute | Effect on operation |\n|---|---|\n| `KeyState: PendingDeletion` + `DeletionDate` set | BLOCKED — key in deletion window (7-30 days). Cancel deletion (`schedule-key-deletion` with `--pending-window-in-days 0` is not supported; you must wait or use `cancel-key-deletion` to restore). |\n| `KeyState: Disabled` | BLOCKED — key disabled. `EnableKeyRotation` requires `Enabled: true`. Call `enable-key` first. |\n| `KeyUsage: SIGN_VERIFY` (asymmetric) | BLOCKED for automatic rotation. Manual rotation required. |\n| `KeyUsage: GENERATE_VERIFY_MAC` (HMAC) | BLOCKED for automatic rotation. Manual rotation required. |\n| `KeySpec: RSA_2048` \u002F `ECC_NIST_P256` etc. | BLOCKED for automatic rotation. Manual rotation required. |\n| `Origin: EXTERNAL` (BYOK \u002F imported material) | BLOCKED for automatic rotation. Re-import new material to rotate. |\n| `Origin: AWS_CLOUDHSM` | Supported if the cluster is `ACTIVE`. KMS rotates the backing key in the CloudHSM. |\n| `MultiRegionConfiguration.MultiRegionKeyType: REPLICA` | BLOCKED for `EnableKeyRotation` on the replica. Enable on the primary; replica inherits. |\n| `MultiRegionConfiguration.MultiRegionKeyType: PRIMARY` | OK — rotation propagates to all replicas automatically. |\n| Key policy denies caller `kms:EnableKeyRotation` | BLOCKED — add the permission to the policy (or call from a role that already has it). |\n| `Enabled: false` in `get-key-rotation-status` | Not an error — rotation is currently disabled. The operation `enable-rotation` will enable it. |\n| `Enabled: true` in `get-key-rotation-status` | If the operation is `enable-rotation`, no-op or update `RotationPeriodInSeconds`. If `disable-rotation`, plan the disable. |\n\n## Process — operation planning (apply in order)\n\n### Step 0: Expert knowledge — non-obvious KMS behaviors\n\nStep-0 expert behaviors moved verbatim to `references\u002Fadvanced-patterns.md`\n(backing material, rotation period, aliases, grants, AWS-managed keys, more).\n\n### Step 1: Pre-check gate — BLOCKED if any check fails\n\nRun ALL pre-checks for the chosen operation. If ANY fails, the verdict\nis BLOCKED with the failed checks in PRE_CHECKS. Do NOT execute.\n\n**For ALL operations:**\n1. Key exists (`describe-key` does not return `NotFoundException`).\n2. Key is NOT `PendingDeletion` (`DeletionDate` absent,\n   `KeyState != PendingDeletion`).\n3. Calling identity has `kms:GetKeyRotationStatus` on the key (for\n   verify-rotation and diagnose-rotation).\n\n**For enable-rotation (`enable-key-rotation --key-id`):**\n4. `KeyState: Enabled` (not `Disabled`).\n5. `KeySpec: SYMMETRIC_DEFAULT` (or AES variant).\n6. `KeyUsage: ENCRYPT_DECRYPT`.\n7. `Origin: AWS_KMS` OR `Origin: AWS_CLOUDHSM` (with cluster ACTIVE).\n8. NOT a Multi-Region replica\n   (`MultiRegionConfiguration.MultiRegionKeyType == PRIMARY` or key is\n   single-region).\n9. Calling identity has `kms:EnableKeyRotation` on the key ARN.\n10. (Optional) `--rotation-period-in-days` is in [7, 365], if\n    specified.\n\n**For verify-rotation (read-only, no BLOCKED gate for state):**\n4. `get-key-rotation-status` returns `Enabled` and `NextRotationDate`.\n5. CloudTrail shows an `EnableKeyRotation` event matching the key ARN\n   (within the last rotation period).\n6. (Optional) `NextRotationDate` is within the expected window.\n\n**For disable-rotation (`disable-key-rotation --key-id`):**\n4. `KeyState: Enabled`.\n5. Current `get-key-rotation-status.Enabled: true` (otherwise it is a\n   no-op).\n6. Calling identity has `kms:DisableKeyRotation` on the key ARN.\n7. (Advisory) Disabling rotation is rare and usually a compliance\n   violation. Confirm the operator has a documented reason.\n\n**For plan-manual-rotation (asymmetric \u002F HMAC \u002F external-material):**\n4. Key is asymmetric (`KeyUsage: SIGN_VERIFY`), HMAC\n   (`GENERATE_VERIFY_MAC`), or `Origin: EXTERNAL`.\n5. Operator has `kms:CreateKey` permission (to create the new key).\n6. List of all callers \u002F aliases that reference the key — needed to\n   plan the cutover.\n7. (Optional) The set of ciphertexts \u002F signatures \u002F MACs that need\n   re-encryption or re-signing (for compliance).\n\n**For diagnose-rotation (read-only):**\n4. Read `get-key-rotation-status`, CloudTrail events, and the\n   failure-mode table to identify why rotation cannot be enabled or\n   why it did not run.\n\n**Rotation failure-mode table (use during diagnose-rotation):**\n\nRotation failure-mode table (API errors -> fixes) moved verbatim to\n`references\u002Ferror-handling.md` (load on demand).\n\n### Step 2: READY — emit operation plan\n\nIf all pre-checks pass, emit `VERDICT: READY` with the exact CLI\nsequence and the CONFIRM gate. The plan includes:\n\n- The exact AWS CLI command with all flags populated from the key\n  configuration.\n- The expected `RotationPeriodInSeconds` (365 days default, or the\n  specified value).\n- The expected side-effects (rotation status flips to `Enabled`,\n  `NextRotationDate` is set to ~365 days from now, key policy\n  unchanged, applications unaffected).\n- The CONFIRM gate prompt.\n- The verification step (`get-key-rotation-status` + CloudTrail +\n  application spot-check).\n\n### Step 3: Execute behind CONFIRM gate\n\n- **MANDATORY CONFIRMATION GATE.** Before any state-changing CLI\n  (`enable-key-rotation`, `disable-key-rotation`, `enable-key`,\n  `disable-key`, `schedule-key-deletion`, `cancel-key-deletion`,\n  `create-key`, `update-alias`), emit:\n  `CONFIRM: About to \u003Coperation> on KMS key \u003Ckey-id> (account\n  \u003Caccount> region \u003Cregion>). This will \u003Cconsequence>. Proceed?\n  (yes\u002Fno)`. Do NOT execute until the operator confirms.\n- Capture pre-state for rollback: `aws kms describe-key --key-id \u003Cid>\n  --output json > \u002Ftmp\u002F\u003Cid>-describe-pre-$(date +%s).json` AND\n  `aws kms get-key-rotation-status --key-id \u003Cid> --output json >\n  \u002Ftmp\u002F\u003Cid>-rotation-pre-$(date +%s).json`.\n- Execute the CLI. `enable-key-rotation` is synchronous — it returns\n  once the rotation schedule is set. The actual material rotation\n  happens at `NextRotationDate`.\n- For manual rotations: the cutover (alias update or caller update)\n  is the state-changing step. Capture the alias pre-state.\n\n### Step 4: Post-verification — COMPLETED\n\nAfter the CLI completes, run post-verification. ALL checks must pass\nfor `COMPLETED`.\n\n1. `get-key-rotation-status --key-id \u003Cid>` — confirm `Enabled: true`\n   (or `false` for disable-rotation) and `NextRotationDate` is set\n   (or absent for disable).\n2. CloudTrail shows the `EnableKeyRotation` (or `DisableKeyRotation`)\n   event with the key ARN and the caller's identity.\n3. `describe-key --key-id \u003Cid>` — confirm `KeyState: Enabled` (the\n   key itself is unaffected by the rotation-status change).\n4. `get-key-policy --key-id \u003Cid> --policy-name default` — confirm\n   the policy is unchanged (rotation does not modify policy).\n5. `list-grants --key-id \u003Cid>` — confirm grants are unchanged.\n6. Spot-check: an application using the key ARN performs a test\n   `Encrypt` + `Decrypt` cycle successfully (or confirm via metrics\n   that no `KMSKeyUnavailableException` or `AccessDeniedException`\n   spike occurred).\n\nIf ANY verification fails, emit `VERDICT: ERROR` with the failure\ndetails — do not claim COMPLETED. A failed verification typically\nmeans the key policy was inadvertently modified or the key was\nsimultaneously disabled by another process.\n\n## Output format (per operation)\n\n```text\nOPERATION: \u003Cenable-rotation | verify-rotation | disable-rotation | plan-manual-rotation | diagnose-rotation>\nVERDICT: READY | BLOCKED | COMPLETED\nTARGET: \u003Ckey-id> (alias: \u003Calias-or-\"none\">, account \u003Caccount>, region \u003Cregion>)\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>\n  3. \u003Cnext step>\nPOST_VERIFY:\n  - [PASS] \u003Cverification description>\n  - [FAIL] \u003Cverification description> — \u003Creason>\nNOTES: \u003Crotation period, material lifecycle, monitoring, caveats>\n```\n\n### Worked example — enable-rotation (symmetric CMK)\n\n```text\nOPERATION: enable-rotation\nVERDICT: READY\nTARGET: arn:aws:kms:us-east-1:111111111111:key\u002Fabcd1234-... (alias:\n        alias\u002Fprod-app-encryption-key, account 111111111111, region\n        us-east-1)\nPRE_CHECKS:\n  - [PASS] Key exists, KeyState: Enabled\n  - [PASS] Not PendingDeletion (DeletionDate absent)\n  - [PASS] KeySpec: SYMMETRIC_DEFAULT, KeyUsage: ENCRYPT_DECRYPT\n  - [PASS] Origin: AWS_KMS (supports automatic rotation)\n  - [PASS] Single-region key (not a Multi-Region replica)\n  - [PASS] Calling role has kms:EnableKeyRotation via key policy\n    statement allowing arn:aws:iam::111111111111:role\u002FSecurityAdmin\n  - [PASS] RotationPeriodInSeconds: 365 (default — annual)\nSTEPS:\n  1. CONFIRM: About to enable automatic backing-key rotation on KMS\n     key alias\u002Fprod-app-encryption-key\n     (arn:aws:kms:us-east-1:111111111111:key\u002Fabcd1234-...) in account\n     111111111111 region us-east-1. Rotation period: 365 days. The key\n     ID, ARN, policy, grants, and aliases are unchanged. Existing\n     ciphertext remains decryptable. New Encrypt operations use the\n     new backing material after the first rotation. Proceed? (yes\u002Fno)\n  2. aws kms enable-key-rotation \\\n       --key-id arn:aws:kms:us-east-1:111111111111:key\u002Fabcd1234-...\n  3. (Optional) Verify immediately:\n     aws kms get-key-rotation-status \\\n       --key-id arn:aws:kms:us-east-1:111111111111:key\u002Fabcd1234-...\nPOST_VERIFY:\n  - (pending execution)\nNOTES:\n  - The first rotation will occur within 24 hours of NextRotationDate\n    (approximately 365 days from enablement). KMS performs the\n    material swap; no application action is needed.\n  - Old backing material is retained indefinitely (until the key is\n    deleted). Existing ciphertext encrypted with old material remains\n    decryptable — no re-encryption required.\n  - CloudTrail will log the EnableKeyRotation event immediately. The\n    actual material rotation does NOT produce a separate CloudTrail\n    event; verify via NextRotationDate advancing.\n  - For compliance evidence, capture quarterly:\n    aws kms get-key-rotation-status --key-id \u003Cid>\n    and store the output with NextRotationDate.\n```\n\n### Worked example — plan-manual-rotation (asymmetric RSA key)\n\nFull plan-manual-rotation worked example moved verbatim to\n`references\u002Fworked-examples.md` (load on demand).\n\n### Worked example — diagnose-rotation (BLOCKED with remediation)\n\nFull diagnose-rotation worked example moved verbatim to\n`references\u002Fworked-examples.md` (load on demand).\n\n## Anti-Patterns — NEVER\n\n- NEVER call `enable-key-rotation` on an asymmetric, HMAC, or\n  external-material key without first confirming it is a symmetric\n  AWS_KMS-origin key. The API returns `InvalidOperationException`;\n  the operator should plan a manual rotation instead.\n\n- NEVER call `enable-key-rotation` on a Multi-Region replica key. The\n  API returns `InvalidOperationException`. Enable rotation on the\n  primary; the replica inherits the status.\n\n- NEVER disable or delete an old key immediately after a manual\n  rotation. Existing ciphertext, signatures, or MACs produced with the\n  old key require the old key to be `Enabled` for decrypt \u002F verify.\n  Disable only after confirming all artifacts have been re-encrypted \u002F\n  re-signed or are no longer needed (typically 90+ days).\n\n- NEVER assume `get-key-rotation-status.Enabled: true` means a\n  rotation has occurred. It means rotation is SCHEDULED. The actual\n  material swap happens at `NextRotationDate`. For proof that a\n  rotation ran, compare `NextRotationDate` advancing over time or\n  inspect the key's internal material versions (KMS does not expose\n  material IDs publicly — `NextRotationDate` advancing is the\n  observable signal).\n\n- NEVER assume AWS-managed keys (`aws\u002Fs3`, `aws\u002Frds`, etc.) rotate\n  annually. They rotate approximately every 3 years on an AWS-managed\n  schedule. You CANNOT enable, disable, or configure rotation on\n  AWS-managed keys. For annual rotation compliance, use customer-\n  managed keys.\n\n- NEVER modify the key policy as part of a rotation operation. The\n  policy is independent of the backing material. A policy change\n  during rotation creates confusion about which change caused any\n  subsequent access issue.\n\n- NEVER assume `RotationPeriodInSeconds` is fixed at 365 days. It is\n  configurable (7-365 days, default 365). Always read the current\n  value from `get-key-rotation-status` before planning.\n\n- NEVER confuse `enable-key-rotation` with `rotate-key-on-demand`\n  (2024+ feature for immediate material rotation on symmetric keys).\n  `enable-key-rotation` schedules recurring rotation;\n  `rotate-key-on-demand` performs an immediate material swap. Use\n  on-demand for incident response (suspected key compromise); use\n  scheduled for routine cryptographic agility.\n\n- NEVER call `schedule-key-deletion` to \"force a rotation.\" Deletion\n  is irreversible within the 7-30 day window; `cancel-key-deletion`\n  restores the key but cancels its rotation schedule. Use\n  `rotate-key-on-demand` for an immediate rotation instead.\n\n- NEVER hard-code a key ARN in application configuration if you can\n  use an alias. Aliases make manual rotation a one-line `update-alias`\n  cutover; ARNs require updating every caller.\n\n- NEVER assume CloudTrail logs the actual material rotation. CloudTrail\n  logs `EnableKeyRotation` and `DisableKeyRotation` (management\n  events). The material swap itself is an internal KMS operation with\n  no separate CloudTrail event. Use `NextRotationDate` advancing as\n  the observable signal.\n\n- NEVER enable rotation on a key whose CloudHSM cluster is\n  `DEGRADED` or `DISCONNECTED`. The `enable-key-rotation` API may\n  succeed but the actual rotation will fail until the cluster is\n  `ACTIVE`. Verify cluster state first.\n\n- NEVER re-create grants after an automatic rotation. Grants are per-\n  key-ID and survive rotation. Re-creating grants can create\n  conflicting permissions and is unnecessary.\n\n- NEVER call `disable-key-rotation` without a documented compliance\n  exception. Disabling rotation is almost always a policy violation.\n  If the goal is to \"pause\" rotation temporarily, leave rotation\n  enabled and address the underlying concern instead.\n\n- NEVER auto-execute a state-changing KMS CLI without the CONFIRM\n  gate. Rotation operations are reversible, but disabling a key or\n  scheduling deletion during a \"rotation\" workflow can cause\n  immediate application outages.\n\n## Pre-flight safety checks (run before any remediation CLI)\n\nPre-flight safety checks moved verbatim to\n`references\u002Fdiagnostic-commands.md` (load on demand).\n\n## Recent AWS features (2024-2026)\n\nRecent-feature details moved verbatim to\n`references\u002Fadvanced-patterns.md` (load on demand).\n\n\n## References (load on demand)\n\n- [`references\u002Fworked-examples.md`](references\u002Fworked-examples.md) — secondary worked examples: plan-manual-rotation (asymmetric RSA), diagnose-rotation (BLOCKED replica key).\n- [`references\u002Fadvanced-patterns.md`](references\u002Fadvanced-patterns.md) — Step-0 expert KMS rotation behaviors, recent AWS features 2024-2026.\n- [`references\u002Ferror-handling.md`](references\u002Ferror-handling.md) — rotation failure-mode table (symptom \u002F root cause \u002F fix).\n- [`references\u002Fdiagnostic-commands.md`](references\u002Fdiagnostic-commands.md) — sweep pagination, live-account pre-flight command listing, pre-flight safety checks.\n- [`references\u002Fkey-type-and-rotation-matrix.md`](references\u002Fkey-type-and-rotation-matrix.md) — key type rotation support matrix and procedures.\n- [`references\u002Fmanual-rotation-procedures.md`](references\u002Fmanual-rotation-procedures.md) — manual rotation procedures (caller identification, cutover).\n\n## Domain\n\nAWS CloudOps \u002F KMS Key Rotation, Cryptographic Agility & Compliance.\n\n## AWS documentation\n\n- **AWS KMS Developer Guide** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fkms\u002Flatest\u002Fdeveloperguide\u002F\n- **Rotating keys** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fkms\u002Flatest\u002Fdeveloperguide\u002Frotate-keys.html\n- **Automatic key rotation** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fkms\u002Flatest\u002Fdeveloperguide\u002Frotate-keys.html#rotate-keys-how-it-works\n- **Manual key rotation** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fkms\u002Flatest\u002Fdeveloperguide\u002Frotate-keys.html#rotating-keys-manually\n- **Multi-Region keys** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fkms\u002Flatest\u002Fdeveloperguide\u002Fmulti-region-keys-manage.html\n- **Custom key stores** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fkms\u002Flatest\u002Fdeveloperguide\u002Fcustom-key-store-overview.html\n- **KMS API Reference** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fkms\u002Flatest\u002FAPIReference\u002F\n- **KMS CLI Reference** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fcli\u002Flatest\u002Freference\u002Fkms\u002F\n- **KMS key quotas** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fkms\u002Flatest\u002Fdeveloperguide\u002Fresource-limits.html\n","# KMS Key Rotation Operator\n\n## What this skill does\n\nExecutes KMS key rotation operations correctly and safely. Runs\ndeterministic pre-checks before any state-changing CLI (key Enabled,\nnot PendingDeletion, symmetric SYMMETRIC_DEFAULT usage, Multi-Region\nprimary not replica, EnableKeyRotation permission in the key policy,\nnot a custom key store with external rotation), executes the\n`enable-key-rotation` \u002F `disable-key-rotation` CLI behind a CONFIRM\ngate, and verifies the result by confirming\n`get-key-rotation-status` returns `Enabled: true` and CloudTrail shows\nthe `EnableKeyRotation` event. Every enable-rotation produces a\ncryptographic-material lifecycle note (old backing material retained\nfor decrypt of existing ciphertext; new material encrypts all new\noperations transparently). Every asymmetric\u002FHMAC key plan routes to\nmanual rotation (create new key, update callers, re-encrypt) since\nautomatic rotation is not supported.\n\n## Quick navigation\n\n| Section | What it covers | When to read it |\n|---|---|---|\n| **§ Quick reference** | Verdict thresholds (BLOCKED\u002FREADY\u002FCOMPLETED) + pre-check priority | Before any operation |\n| **§ Mindset** | Why rotation is transparent, the asymmetric-gap, the confirm gate | Understanding the safety model |\n| **§ Pre-flight** | Key metadata gate — Enabled state, PendingDeletion, Multi-Region, custom key store | Before executing any CLI |\n| **§ Process** | Per-operation planning: enable, verify, disable, plan-manual, diagnose | When choosing which operation to run |\n| **§ Output format** | Structured OPERATION\u002FVERDICT\u002FPRE_CHECKS\u002FSTEPS\u002FPOST_VERIFY template | Formatting the response |\n| **§ Anti-Patterns** | NEVER list — common mistakes that break encryption or strand data | Review before risky operations |\n| **§ Pre-flight safety** | Capture pre-state, CloudTrail trail verification, key policy check | Defense-in-depth |\n\n## Quick reference — verdict thresholds\n\n| Verdict | Trigger condition | Action |\n|---|---|---|\n| `BLOCKED` | One or more pre-checks failed (key Disabled, key PendingDeletion, asymmetric\u002FHMAC usage with auto-rotation requested, replica key with auto-rotation requested, missing EnableKeyRotation permission, custom key store with external rotation) | List failures, do NOT execute |\n| `READY` | All pre-checks passed; awaiting CONFIRM gate | Emit exact CLI sequence, wait for operator yes |\n| `COMPLETED` | Rotation enable\u002Fdisable finished and post-verification passed (`get-key-rotation-status` matches intent, CloudTrail event present, key policy unchanged, applications using key ARN still work) | Emit verification results, monitoring plan |\n\n**Priority order for pre-checks (apply in this sequence, all must pass\nfor READY):**\n\n1. **Key reachability** — key exists (`describe-key` does not return\n   `NotFoundException`), `Enabled` true, `KeyState: Enabled`.\n2. **No deletion pending** — `KeyState` is NOT `PendingDeletion` (no\n   rotation during the deletion window).\n3. **Key supports automatic rotation** — `KeySpec` is\n   `SYMMETRIC_DEFAULT` (or `AES_256` for multi-Region primary) AND\n   `KeyUsage: ENCRYPT_DECRYPT` AND `Origin: AWS_KMS`. Asymmetric,\n   HMAC, and external-key-material keys do NOT support automatic\n   rotation.\n4. **Multi-Region primary** — for Multi-Region keys, rotation is\n   controlled by the primary key. A replica key\n   (`MultiRegionConfiguration.PrimaryArmy` != self) inherits the\n   primary's rotation status; `EnableKeyRotation` on a replica fails.\n5. **Key policy permission** — the calling identity must have\n   `kms:EnableKeyRotation` (or `kms:DisableKeyRotation`) on the key\n   ARN. The key's own resource-based policy must allow the caller, or\n   the caller's identity-based policy must grant it. Cross-account\n   callers need both sides.\n6. **Custom key store check** — for `Origin: AWS_CLOUDHSM`, rotation\n   is supported (KMS rotates the backing key in the CloudHSM cluster),\n  but the cluster must be `ACTIVE`. For `Origin: EXTERNAL`, rotation\n   is NOT supported (you manage the key material externally).\n7. **Schedule intent clarity** — `enable-key-rotation` accepts an\n   optional `--rotation-period-in-days` (7-365, default 365). Confirm\n   the intended cadence before enabling.\n\n**Cost\u002Ftime baselines (2026):**\n\n- Customer-managed CMK: $1.00\u002Fkey\u002Fmonth (regardless of rotation).\n- Automatic rotation: no additional per-rotation fee. The CMK keeps\n  its key ID and ARN; KMS retains old backing material for decrypt.\n- Asymmetric keys (RSA, ECC): $1.00\u002Fkey\u002Fmonth; do NOT support\n  automatic rotation. Manual rotation = create new key + update\n  callers + optional re-encrypt.\n- HMAC keys: $1.00\u002Fkey\u002Fmonth; do NOT support automatic rotation.\n- Multi-Region keys: $1.00 per primary + $1.00 per replica.\n- CloudTrail `EnableKeyRotation` \u002F `DisableKeyRotation` events: free\n  (management events).\n- Re-encryption cost (manual rotation): `$0.03` per 10,000\n  `Encrypt`\u002F`Decrypt` requests. Re-encrypting a large S3 bucket or\n  DynamoDB table is the dominant cost, not KMS itself.\n\n## Mindset\n\n**One-line takeaway:** automatic KMS key rotation is transparent to\napplications — the key ID and ARN do not change, and old backing\nmaterial is retained so existing ciphertext remains decryptable.\nDriven by three KMS realities:\n\n- **Rotation swaps backing material, not the key.** A KMS key is a\n  logical construct (key ID + ARN + policy) backed by cryptographic\n  material. Automatic rotation creates new backing material under the\n  same key ID. All new `Encrypt` operations use the new material; all\n  `Decrypt` operations on existing ciphertext use the material that\n  originally encrypted it (KMS tracks which material produced each\n  ciphertext via the encryption context). Applications see no change.\n\n- **Asymmetric and HMAC keys are the rotation blind spot.** Automatic\n  rotation is supported ONLY on symmetric ENCRYPT_DECRYPT keys with\n  `Origin: AWS_KMS` (and CloudHSM-backed symmetric keys). RSA, ECDSA,\n  HMAC, and external-material keys do NOT support automatic rotation.\n  For these, you must rotate manually: create a new key, update all\n  callers to use the new key ARN, and optionally re-encrypt old data.\n  This is a significant operational gap — auditors asking \"are all\n  keys rotating annually?\" need to be told that asymmetric keys are\n  manually rotated.\n\n- **A Multi-Region replica key's rotation is set on the primary.**\n  Calling `EnableKeyRotation` on a replica returns\n  `InvalidOperationException`. Multi-Region replica keys share the\n  same cryptographic material as the primary — when the primary's\n  backing material rotates, replicas receive the new material\n  automatically. Verify rotation on the primary's\n  `get-key-rotation-status`.\n\n## Pre-flight: key metadata gate\n\nRun before classification. Misclassifying these produces wrong plans.\n\nPagination + live-account pre-flight commands moved verbatim to\n`references\u002Fdiagnostic-commands.md` (load on demand).\n\n**Malformed input:** if the input JSON is invalid or missing required\nfields, emit `VERDICT: ERROR` with `REASON: Key configuration is not\nvalid JSON or is missing required fields — cannot plan.` and\n`REMEDIATION: Re-fetch with aws kms describe-key --key-id \u003Cid> --output\njson and re-plan.`\n\n| Key attribute | Effect on operation |\n|---|---|\n| `KeyState: PendingDeletion` + `DeletionDate` set | BLOCKED — key in deletion window (7-30 days). Cancel deletion (`schedule-key-deletion` with `--pending-window-in-days 0` is not supported; you must wait or use `cancel-key-deletion` to restore). |\n| `KeyState: Disabled` | BLOCKED — key disabled. `EnableKeyRotation` requires `Enabled: true`. Call `enable-key` first. |\n| `KeyUsage: SIGN_VERIFY` (asymmetric) | BLOCKED for automatic rotation. Manual rotation required. |\n| `KeyUsage: GENERATE_VERIFY_MAC` (HMAC) | BLOCKED for automatic rotation. Manual rotation required. |\n| `KeySpec: RSA_2048` \u002F `ECC_NIST_P256` etc. | BLOCKED for automatic rotation. Manual rotation required. |\n| `Origin: EXTERNAL` (BYOK \u002F imported material) | BLOCKED for automatic rotation. Re-import new material to rotate. |\n| `Origin: AWS_CLOUDHSM` | Supported if the cluster is `ACTIVE`. KMS rotates the backing key in the CloudHSM. |\n| `MultiRegionConfiguration.MultiRegionKeyType: REPLICA` | BLOCKED for `EnableKeyRotation` on the replica. Enable on the primary; replica inherits. |\n| `MultiRegionConfiguration.MultiRegionKeyType: PRIMARY` | OK — rotation propagates to all replicas automatically. |\n| Key policy denies caller `kms:EnableKeyRotation` | BLOCKED — add the permission to the policy (or call from a role that already has it). |\n| `Enabled: false` in `get-key-rotation-status` | Not an error — rotation is currently disabled. The operation `enable-rotation` will enable it. |\n| `Enabled: true` in `get-key-rotation-status` | If the operation is `enable-rotation`, no-op or update `RotationPeriodInSeconds`. If `disable-rotation`, plan the disable. |\n\n## Process — operation planning (apply in order)\n\n### Step 0: Expert knowledge — non-obvious KMS behaviors\n\nStep-0 expert behaviors moved verbatim to `references\u002Fadvanced-patterns.md`\n(backing material, rotation period, aliases, grants, AWS-managed keys, more).\n\n### Step 1: Pre-check gate — BLOCKED if any check fails\n\nRun ALL pre-checks for the chosen operation. If ANY fails, the verdict\nis BLOCKED with the failed checks in PRE_CHECKS. Do NOT execute.\n\n**For ALL operations:**\n1. Key exists (`describe-key` does not return `NotFoundException`).\n2. Key is NOT `PendingDeletion` (`DeletionDate` absent,\n   `KeyState != PendingDeletion`).\n3. Calling identity has `kms:GetKeyRotationStatus` on the key (for\n   verify-rotation and diagnose-rotation).\n\n**For enable-rotation (`enable-key-rotation --key-id`):**\n4. `KeyState: Enabled` (not `Disabled`).\n5. `KeySpec: SYMMETRIC_DEFAULT` (or AES variant).\n6. `KeyUsage: ENCRYPT_DECRYPT`.\n7. `Origin: AWS_KMS` OR `Origin: AWS_CLOUDHSM` (with cluster ACTIVE).\n8. NOT a Multi-Region replica\n   (`MultiRegionConfiguration.MultiRegionKeyType == PRIMARY` or key is\n   single-region).\n9. Calling identity has `kms:EnableKeyRotation` on the key ARN.\n10. (Optional) `--rotation-period-in-days` is in [7, 365], if\n    specified.\n\n**For verify-rotation (read-only, no BLOCKED gate for state):**\n4. `get-key-rotation-status` returns `Enabled` and `NextRotationDate`.\n5. CloudTrail shows an `EnableKeyRotation` event matching the key ARN\n   (within the last rotation period).\n6. (Optional) `NextRotationDate` is within the expected window.\n\n**For disable-rotation (`disable-key-rotation --key-id`):**\n4. `KeyState: Enabled`.\n5. Current `get-key-rotation-status.Enabled: true` (otherwise it is a\n   no-op).\n6. Calling identity has `kms:DisableKeyRotation` on the key ARN.\n7. (Advisory) Disabling rotation is rare and usually a compliance\n   violation. Confirm the operator has a documented reason.\n\n**For plan-manual-rotation (asymmetric \u002F HMAC \u002F external-material):**\n4. Key is asymmetric (`KeyUsage: SIGN_VERIFY`), HMAC\n   (`GENERATE_VERIFY_MAC`), or `Origin: EXTERNAL`.\n5. Operator has `kms:CreateKey` permission (to create the new key).\n6. List of all callers \u002F aliases that reference the key — needed to\n   plan the cutover.\n7. (Optional) The set of ciphertexts \u002F signatures \u002F MACs that need\n   re-encryption or re-signing (for compliance).\n\n**For diagnose-rotation (read-only):**\n4. Read `get-key-rotation-status`, CloudTrail events, and the\n   failure-mode table to identify why rotation cannot be enabled or\n   why it did not run.\n\n**Rotation failure-mode table (use during diagnose-rotation):**\n\nRotation failure-mode table (API errors -> fixes) moved verbatim to\n`references\u002Ferror-handling.md` (load on demand).\n\n### Step 2: READY — emit operation plan\n\nIf all pre-checks pass, emit `VERDICT: READY` with the exact CLI\nsequence and the CONFIRM gate. The plan includes:\n\n- The exact AWS CLI command with all flags populated from the key\n  configuration.\n- The expected `RotationPeriodInSeconds` (365 days default, or the\n  specified value).\n- The expected side-effects (rotation status flips to `Enabled`,\n  `NextRotationDate` is set to ~365 days from now, key policy\n  unchanged, applications unaffected).\n- The CONFIRM gate prompt.\n- The verification step (`get-key-rotation-status` + CloudTrail +\n  application spot-check).\n\n### Step 3: Execute behind CONFIRM gate\n\n- **MANDATORY CONFIRMATION GATE.** Before any state-changing CLI\n  (`enable-key-rotation`, `disable-key-rotation`, `enable-key`,\n  `disable-key`, `schedule-key-deletion`, `cancel-key-deletion`,\n  `create-key`, `update-alias`), emit:\n  `CONFIRM: About to \u003Coperation> on KMS key \u003Ckey-id> (account\n  \u003Caccount> region \u003Cregion>). This will \u003Cconsequence>. Proceed?\n  (yes\u002Fno)`. Do NOT execute until the operator confirms.\n- Capture pre-state for rollback: `aws kms describe-key --key-id \u003Cid>\n  --output json > \u002Ftmp\u002F\u003Cid>-describe-pre-$(date +%s).json` AND\n  `aws kms get-key-rotation-status --key-id \u003Cid> --output json >\n  \u002Ftmp\u002F\u003Cid>-rotation-pre-$(date +%s).json`.\n- Execute the CLI. `enable-key-rotation` is synchronous — it returns\n  once the rotation schedule is set. The actual material rotation\n  happens at `NextRotationDate`.\n- For manual rotations: the cutover (alias update or caller update)\n  is the state-changing step. Capture the alias pre-state.\n\n### Step 4: Post-verification — COMPLETED\n\nAfter the CLI completes, run post-verification. ALL checks must pass\nfor `COMPLETED`.\n\n1. `get-key-rotation-status --key-id \u003Cid>` — confirm `Enabled: true`\n   (or `false` for disable-rotation) and `NextRotationDate` is set\n   (or absent for disable).\n2. CloudTrail shows the `EnableKeyRotation` (or `DisableKeyRotation`)\n   event with the key ARN and the caller's identity.\n3. `describe-key --key-id \u003Cid>` — confirm `KeyState: Enabled` (the\n   key itself is unaffected by the rotation-status change).\n4. `get-key-policy --key-id \u003Cid> --policy-name default` — confirm\n   the policy is unchanged (rotation does not modify policy).\n5. `list-grants --key-id \u003Cid>` — confirm grants are unchanged.\n6. Spot-check: an application using the key ARN performs a test\n   `Encrypt` + `Decrypt` cycle successfully (or confirm via metrics\n   that no `KMSKeyUnavailableException` or `AccessDeniedException`\n   spike occurred).\n\nIf ANY verification fails, emit `VERDICT: ERROR` with the failure\ndetails — do not claim COMPLETED. A failed verification typically\nmeans the key policy was inadvertently modified or the key was\nsimultaneously disabled by another process.\n\n## Output format (per operation)\n\n```text\nOPERATION: \u003Cenable-rotation | verify-rotation | disable-rotation | plan-manual-rotation | diagnose-rotation>\nVERDICT: READY | BLOCKED | COMPLETED\nTARGET: \u003Ckey-id> (alias: \u003Calias-or-\"none\">, account \u003Caccount>, region \u003Cregion>)\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>\n  3. \u003Cnext step>\nPOST_VERIFY:\n  - [PASS] \u003Cverification description>\n  - [FAIL] \u003Cverification description> — \u003Creason>\nNOTES: \u003Crotation period, material lifecycle, monitoring, caveats>\n```\n\n### Worked example — enable-rotation (symmetric CMK)\n\n```text\nOPERATION: enable-rotation\nVERDICT: READY\nTARGET: arn:aws:kms:us-east-1:111111111111:key\u002Fabcd1234-... (alias:\n        alias\u002Fprod-app-encryption-key, account 111111111111, region\n        us-east-1)\nPRE_CHECKS:\n  - [PASS] Key exists, KeyState: Enabled\n  - [PASS] Not PendingDeletion (DeletionDate absent)\n  - [PASS] KeySpec: SYMMETRIC_DEFAULT, KeyUsage: ENCRYPT_DECRYPT\n  - [PASS] Origin: AWS_KMS (supports automatic rotation)\n  - [PASS] Single-region key (not a Multi-Region replica)\n  - [PASS] Calling role has kms:EnableKeyRotation via key policy\n    statement allowing arn:aws:iam::111111111111:role\u002FSecurityAdmin\n  - [PASS] RotationPeriodInSeconds: 365 (default — annual)\nSTEPS:\n  1. CONFIRM: About to enable automatic backing-key rotation on KMS\n     key alias\u002Fprod-app-encryption-key\n     (arn:aws:kms:us-east-1:111111111111:key\u002Fabcd1234-...) in account\n     111111111111 region us-east-1. Rotation period: 365 days. The key\n     ID, ARN, policy, grants, and aliases are unchanged. Existing\n     ciphertext remains decryptable. New Encrypt operations use the\n     new backing material after the first rotation. Proceed? (yes\u002Fno)\n  2. aws kms enable-key-rotation \\\n       --key-id arn:aws:kms:us-east-1:111111111111:key\u002Fabcd1234-...\n  3. (Optional) Verify immediately:\n     aws kms get-key-rotation-status \\\n       --key-id arn:aws:kms:us-east-1:111111111111:key\u002Fabcd1234-...\nPOST_VERIFY:\n  - (pending execution)\nNOTES:\n  - The first rotation will occur within 24 hours of NextRotationDate\n    (approximately 365 days from enablement). KMS performs the\n    material swap; no application action is needed.\n  - Old backing material is retained indefinitely (until the key is\n    deleted). Existing ciphertext encrypted with old material remains\n    decryptable — no re-encryption required.\n  - CloudTrail will log the EnableKeyRotation event immediately. The\n    actual material rotation does NOT produce a separate CloudTrail\n    event; verify via NextRotationDate advancing.\n  - For compliance evidence, capture quarterly:\n    aws kms get-key-rotation-status --key-id \u003Cid>\n    and store the output with NextRotationDate.\n```\n\n### Worked example — plan-manual-rotation (asymmetric RSA key)\n\nFull plan-manual-rotation worked example moved verbatim to\n`references\u002Fworked-examples.md` (load on demand).\n\n### Worked example — diagnose-rotation (BLOCKED with remediation)\n\nFull diagnose-rotation worked example moved verbatim to\n`references\u002Fworked-examples.md` (load on demand).\n\n## Anti-Patterns — NEVER\n\n- NEVER call `enable-key-rotation` on an asymmetric, HMAC, or\n  external-material key without first confirming it is a symmetric\n  AWS_KMS-origin key. The API returns `InvalidOperationException`;\n  the operator should plan a manual rotation instead.\n\n- NEVER call `enable-key-rotation` on a Multi-Region replica key. The\n  API returns `InvalidOperationException`. Enable rotation on the\n  primary; the replica inherits the status.\n\n- NEVER disable or delete an old key immediately after a manual\n  rotation. Existing ciphertext, signatures, or MACs produced with the\n  old key require the old key to be `Enabled` for decrypt \u002F verify.\n  Disable only after confirming all artifacts have been re-encrypted \u002F\n  re-signed or are no longer needed (typically 90+ days).\n\n- NEVER assume `get-key-rotation-status.Enabled: true` means a\n  rotation has occurred. It means rotation is SCHEDULED. The actual\n  material swap happens at `NextRotationDate`. For proof that a\n  rotation ran, compare `NextRotationDate` advancing over time or\n  inspect the key's internal material versions (KMS does not expose\n  material IDs publicly — `NextRotationDate` advancing is the\n  observable signal).\n\n- NEVER assume AWS-managed keys (`aws\u002Fs3`, `aws\u002Frds`, etc.) rotate\n  annually. They rotate approximately every 3 years on an AWS-managed\n  schedule. You CANNOT enable, disable, or configure rotation on\n  AWS-managed keys. For annual rotation compliance, use customer-\n  managed keys.\n\n- NEVER modify the key policy as part of a rotation operation. The\n  policy is independent of the backing material. A policy change\n  during rotation creates confusion about which change caused any\n  subsequent access issue.\n\n- NEVER assume `RotationPeriodInSeconds` is fixed at 365 days. It is\n  configurable (7-365 days, default 365). Always read the current\n  value from `get-key-rotation-status` before planning.\n\n- NEVER confuse `enable-key-rotation` with `rotate-key-on-demand`\n  (2024+ feature for immediate material rotation on symmetric keys).\n  `enable-key-rotation` schedules recurring rotation;\n  `rotate-key-on-demand` performs an immediate material swap. Use\n  on-demand for incident response (suspected key compromise); use\n  scheduled for routine cryptographic agility.\n\n- NEVER call `schedule-key-deletion` to \"force a rotation.\" Deletion\n  is irreversible within the 7-30 day window; `cancel-key-deletion`\n  restores the key but cancels its rotation schedule. Use\n  `rotate-key-on-demand` for an immediate rotation instead.\n\n- NEVER hard-code a key ARN in application configuration if you can\n  use an alias. Aliases make manual rotation a one-line `update-alias`\n  cutover; ARNs require updating every caller.\n\n- NEVER assume CloudTrail logs the actual material rotation. CloudTrail\n  logs `EnableKeyRotation` and `DisableKeyRotation` (management\n  events). The material swap itself is an internal KMS operation with\n  no separate CloudTrail event. Use `NextRotationDate` advancing as\n  the observable signal.\n\n- NEVER enable rotation on a key whose CloudHSM cluster is\n  `DEGRADED` or `DISCONNECTED`. The `enable-key-rotation` API may\n  succeed but the actual rotation will fail until the cluster is\n  `ACTIVE`. Verify cluster state first.\n\n- NEVER re-create grants after an automatic rotation. Grants are per-\n  key-ID and survive rotation. Re-creating grants can create\n  conflicting permissions and is unnecessary.\n\n- NEVER call `disable-key-rotation` without a documented compliance\n  exception. Disabling rotation is almost always a policy violation.\n  If the goal is to \"pause\" rotation temporarily, leave rotation\n  enabled and address the underlying concern instead.\n\n- NEVER auto-execute a state-changing KMS CLI without the CONFIRM\n  gate. Rotation operations are reversible, but disabling a key or\n  scheduling deletion during a \"rotation\" workflow can cause\n  immediate application outages.\n\n## Pre-flight safety checks (run before any remediation CLI)\n\nPre-flight safety checks moved verbatim to\n`references\u002Fdiagnostic-commands.md` (load on demand).\n\n## Recent AWS features (2024-2026)\n\nRecent-feature details moved verbatim to\n`references\u002Fadvanced-patterns.md` (load on demand).\n\n\n## References (load on demand)\n\n- [`references\u002Fworked-examples.md`](references\u002Fworked-examples.md) — secondary worked examples: plan-manual-rotation (asymmetric RSA), diagnose-rotation (BLOCKED replica key).\n- [`references\u002Fadvanced-patterns.md`](references\u002Fadvanced-patterns.md) — Step-0 expert KMS rotation behaviors, recent AWS features 2024-2026.\n- [`references\u002Ferror-handling.md`](references\u002Ferror-handling.md) — rotation failure-mode table (symptom \u002F root cause \u002F fix).\n- [`references\u002Fdiagnostic-commands.md`](references\u002Fdiagnostic-commands.md) — sweep pagination, live-account pre-flight command listing, pre-flight safety checks.\n- [`references\u002Fkey-type-and-rotation-matrix.md`](references\u002Fkey-type-and-rotation-matrix.md) — key type rotation support matrix and procedures.\n- [`references\u002Fmanual-rotation-procedures.md`](references\u002Fmanual-rotation-procedures.md) — manual rotation procedures (caller identification, cutover).\n\n## Domain\n\nAWS CloudOps \u002F KMS Key Rotation, Cryptographic Agility & Compliance.\n\n## AWS documentation\n\n- **AWS KMS Developer Guide** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fkms\u002Flatest\u002Fdeveloperguide\u002F\n- **Rotating keys** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fkms\u002Flatest\u002Fdeveloperguide\u002Frotate-keys.html\n- **Automatic key rotation** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fkms\u002Flatest\u002Fdeveloperguide\u002Frotate-keys.html#rotate-keys-how-it-works\n- **Manual key rotation** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fkms\u002Flatest\u002Fdeveloperguide\u002Frotate-keys.html#rotating-keys-manually\n- **Multi-Region keys** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fkms\u002Flatest\u002Fdeveloperguide\u002Fmulti-region-keys-manage.html\n- **Custom key stores** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fkms\u002Flatest\u002Fdeveloperguide\u002Fcustom-key-store-overview.html\n- **KMS API Reference** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fkms\u002Flatest\u002FAPIReference\u002F\n- **KMS CLI Reference** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fcli\u002Flatest\u002Freference\u002Fkms\u002F\n- **KMS key quotas** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fkms\u002Flatest\u002Fdeveloperguide\u002Fresource-limits.html\n",{"name":5,"license":15,"metadata":24,"description":7,"compatibility":42},{"tags":25,"phase":26,"author":27,"domain":28,"family":29,"version":30,"keywords":31,"task_type":32,"complexity":33,"entry_point":34,"skill_class":35,"when_to_use":36,"requires_llm":37,"verdict_shape":38,"lifecycle_status":39,"invocation_schema":40,"supports_pipeline":37,"activation_triggers":41},"aws, kms, security, encryption, key-management, rotation, compliance, operate","4","Jacky Chan — AWS Community Builder","aws-cloudops","Security","0.1.0","KMS, key rotation, backing key, cryptographic material, customer managed key, CMK, AWS managed key, Multi-Region key, replica key, asymmetric key, RSA_2048, ECC_NIST_P256, HMAC_256, SYMMETRIC_DEFAULT, EnableKeyRotation, GetKeyRotationStatus, CloudHSM custom key store, key policy, re-encrypt, cryptographic agility","operate","medium","false","capability","Enabling automatic backing-key rotation on a customer-managed KMS key, verifying a key's rotation status and last rotation date, planning a manual rotation for asymmetric\u002FHMAC keys that do not support automatic rotation, diagnosing why EnableKeyRotation fails (Disabled\u002FPendingDeletion key, asymmetric usage, replica key, missing key-policy permission), confirming CloudTrail EnableKeyRotation events, or validating cryptographic-agility posture across a fleet of CMKs.","true","READY | BLOCKED | COMPLETED","active","Input: either (a) a KMS key configuration (describe-key output) plus the intended operation (enable-rotation, verify-rotation, disable-rotation, plan-manual-rotation, diagnose-rotation), OR (b) a key-id + operation for live-account execution. Output: deterministic OPERATION \u002F VERDICT \u002F PRE_CHECKS \u002F STEPS \u002F POST_VERIFY \u002F NOTES block per rotation, where VERDICT is one of READY, BLOCKED, COMPLETED.","enable KMS key rotation, rotate KMS key, verify key rotation, GetKeyRotationStatus, EnableKeyRotation, automatic key rotation, manual key rotation, backing key, Multi-Region key rotation, replica key rotation, asymmetric key rotation, HMAC key rotation, re-encrypt with new key, cryptographic agility, KMS rotation failed","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 kms describe-key, get-key-rotation- status, enable-key-rotation, disable-key-rotation, list-grants, get-key-policy, list-resource-tags, aws cloudtrail lookup-events (AWS CLI v2, SSO or key-based credentials).","main","eeace51bd5dd1db2030729d83eeab988861553aa","skills\u002Fkms-key-rotation-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":52,"prompt":62,"zipAvailable":63},[53,56,59],{"tool":54,"command":55},"npx","npx skills add jhkchan\u002Faws-agent-skills --skill kms-key-rotation-operator",{"tool":57,"command":58},"bunx","bunx skills add jhkchan\u002Faws-agent-skills --skill kms-key-rotation-operator",{"tool":60,"command":61},"pnpm","pnpm dlx skills add jhkchan\u002Faws-agent-skills --skill kms-key-rotation-operator","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkms-key-rotation-operator\u002FSKILL.md",true,[65,71,75,79,83,87,91,95,99,103,107,111,115,119,123,127,131,135,139,143,147],{"path":66,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":69,"sourceHtmlUrl":70},"eval\u002Ftest-cases.yaml","REFERENCE","参考文档",8356,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkms-key-rotation-operator\u002Feval\u002Ftest-cases.yaml",{"path":72,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":73,"sourceHtmlUrl":74},"evals\u002Fbaselines\u002Fenable-rotation-asymmetric-key-blocked.md",442,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkms-key-rotation-operator\u002Fevals\u002Fbaselines\u002Fenable-rotation-asymmetric-key-blocked.md",{"path":76,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":77,"sourceHtmlUrl":78},"evals\u002Fbaselines\u002Fenable-rotation-disabled-key-blocked.md",438,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkms-key-rotation-operator\u002Fevals\u002Fbaselines\u002Fenable-rotation-disabled-key-blocked.md",{"path":80,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":81,"sourceHtmlUrl":82},"evals\u002Fbaselines\u002Fenable-rotation-symmetric-cmk-ready.md",578,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkms-key-rotation-operator\u002Fevals\u002Fbaselines\u002Fenable-rotation-symmetric-cmk-ready.md",{"path":84,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":85,"sourceHtmlUrl":86},"evals\u002Fbaselines\u002Fmulti-region-replica-rotation-blocked.md",497,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkms-key-rotation-operator\u002Fevals\u002Fbaselines\u002Fmulti-region-replica-rotation-blocked.md",{"path":88,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":89,"sourceHtmlUrl":90},"evals\u002Fbaselines\u002Fverify-rotation-enabled-completed.md",384,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkms-key-rotation-operator\u002Fevals\u002Fbaselines\u002Fverify-rotation-enabled-completed.md",{"path":92,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":93,"sourceHtmlUrl":94},"evals\u002Feval_config.yaml",1902,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkms-key-rotation-operator\u002Fevals\u002Feval_config.yaml",{"path":96,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":97,"sourceHtmlUrl":98},"evals\u002Fevals.json",4399,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkms-key-rotation-operator\u002Fevals\u002Fevals.json",{"path":100,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":101,"sourceHtmlUrl":102},"evals\u002Fprompts\u002Fenable-rotation-asymmetric-key-blocked.md",593,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkms-key-rotation-operator\u002Fevals\u002Fprompts\u002Fenable-rotation-asymmetric-key-blocked.md",{"path":104,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":105,"sourceHtmlUrl":106},"evals\u002Fprompts\u002Fenable-rotation-disabled-key-blocked.md",794,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkms-key-rotation-operator\u002Fevals\u002Fprompts\u002Fenable-rotation-disabled-key-blocked.md",{"path":108,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":109,"sourceHtmlUrl":110},"evals\u002Fprompts\u002Fenable-rotation-symmetric-cmk-ready.md",1219,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkms-key-rotation-operator\u002Fevals\u002Fprompts\u002Fenable-rotation-symmetric-cmk-ready.md",{"path":112,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":113,"sourceHtmlUrl":114},"evals\u002Fprompts\u002Fmulti-region-replica-rotation-blocked.md",973,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkms-key-rotation-operator\u002Fevals\u002Fprompts\u002Fmulti-region-replica-rotation-blocked.md",{"path":116,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":117,"sourceHtmlUrl":118},"evals\u002Fprompts\u002Fverify-rotation-enabled-completed.md",1116,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkms-key-rotation-operator\u002Fevals\u002Fprompts\u002Fverify-rotation-enabled-completed.md",{"path":120,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":121,"sourceHtmlUrl":122},"examples\u002FREADME.md",7421,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkms-key-rotation-operator\u002Fexamples\u002FREADME.md",{"path":124,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":125,"sourceHtmlUrl":126},"references\u002Fadvanced-patterns.md",7408,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkms-key-rotation-operator\u002Freferences\u002Fadvanced-patterns.md",{"path":128,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":129,"sourceHtmlUrl":130},"references\u002Fdiagnostic-commands.md",3459,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkms-key-rotation-operator\u002Freferences\u002Fdiagnostic-commands.md",{"path":132,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":133,"sourceHtmlUrl":134},"references\u002Ferror-handling.md",2662,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkms-key-rotation-operator\u002Freferences\u002Ferror-handling.md",{"path":136,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":137,"sourceHtmlUrl":138},"references\u002Fkey-type-and-rotation-matrix.md",8820,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkms-key-rotation-operator\u002Freferences\u002Fkey-type-and-rotation-matrix.md",{"path":140,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":141,"sourceHtmlUrl":142},"references\u002Fmanual-rotation-procedures.md",7343,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkms-key-rotation-operator\u002Freferences\u002Fmanual-rotation-procedures.md",{"path":144,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":145,"sourceHtmlUrl":146},"references\u002Fworked-examples.md",4003,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkms-key-rotation-operator\u002Freferences\u002Fworked-examples.md",{"path":148,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":149,"sourceHtmlUrl":150},"skill.usf.yaml",4713,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkms-key-rotation-operator\u002Fskill.usf.yaml",[152,159,166,173,180,187],{"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},"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":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},"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":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},"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":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},"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":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},"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":188,"name":189,"nameZh":6,"description":190,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":191,"categories":192,"keywords":193,"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",[],[]]