[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7ACMF717RS3Q2XNSAYF08BP":3,"skill-same:01M7ACMF717RS3Q2XNSAYF08BP":148},{"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},"01M7ACMF717RS3Q2XNSAYF08BP","sns-subscription-operator",null,"Operates AWS SNS subscription workflows end-to-end — subscription creation (HTTP\u002FHTTPS\u002FSQS\u002FLambda\u002Femail\u002Fsms\u002Ffirehose), subscription confirmation (PendingConfirmation to Confirmed via token or auto-confirm for SQS\u002FLambda), filter-policy design (message attributes, FilterPolicyScope), delivery policies (retry backoff, dead-letter queue via redrive), subscription attributes (RawMessageDelivery), and diagnostic loops (list-subscriptions-by-topic, get-subscription-attributes, CloudTrail events). Runs deterministic pre-checks (topic exists, endpoint reachable, topic policy permits subscription, protocol valid, filter-policy JSON valid, DLQ target exists for redrive) behind a CONFIRM gate and emits a READY, BLOCKED, or COMPLETED verdict per operation. Use when creating subscriptions, confirming pending subscriptions, debugging filter-policy matches, configuring delivery retry and DLQ, or diagnosing why messages are not delivered.","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\u002Fsns-subscription-operator\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: sns-subscription-operator\ndescription: Operates AWS SNS subscription workflows end-to-end — subscription creation (HTTP\u002FHTTPS\u002FSQS\u002FLambda\u002Femail\u002Fsms\u002Ffirehose), subscription confirmation (PendingConfirmation to Confirmed via token or auto-confirm for SQS\u002FLambda), filter-policy design (message attributes, FilterPolicyScope), delivery policies (retry backoff, dead-letter queue via redrive), subscription attributes (RawMessageDelivery), and diagnostic loops (list-subscriptions-by-topic, get-subscription-attributes, CloudTrail events). Runs deterministic pre-checks (topic exists, endpoint reachable, topic policy permits subscription, protocol valid, filter-policy JSON valid, DLQ target exists for redrive) behind a CONFIRM gate and emits a READY, BLOCKED, or COMPLETED verdict per operation. Use when creating subscriptions, confirming pending subscriptions, debugging filter-policy matches, configuring delivery retry and DLQ, or diagnosing why messages are not delivered.\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 sns subscribe, confirm-subscription, list-subscriptions-by-topic, get-subscription-attributes, set-subscription-attributes, unsubscribe, aws sqs get-queue-attributes \u002F set-queue-attributes (for SQS-backed subscriptions and DLQ), aws lambda get-policy (for Lambda-backed subscriptions), aws firehose describe-delivery-stream (for...\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: AppIntegration\n  task_type: operate\n  skill_class: capability\n  lifecycle_status: active\n  verdict_shape: READY | BLOCKED | COMPLETED\n  when_to_use: Creating an SNS subscription to a topic (HTTP\u002FHTTPS\u002FSQS\u002FLambda\u002F email\u002Fsms\u002Ffirehose\u002Fapplication), confirming a subscription stuck in PendingConfirmation, designing or debugging a subscription filter policy, configuring delivery retry policy and dead-letter queue (DLQ), setting subscription attributes (RawMessageDelivery), diagnosing why messages are not delivered to a subscription, or validating SNS message data protection posture for a subscription.\n  activation_triggers: create SNS subscription, confirm SNS subscription, PendingConfirmation, SNS filter policy, SNS delivery policy, SNS dead-letter queue, SNS subscription redrive, SNS retry backoff, RawMessageDelivery, subscribe to SNS topic, SNS subscription not receiving messages, SNS message data protection, cross-account SNS subscription, SNS firehose subscription, get-subscription-attributes\n  invocation_schema: 'Input: either (a) an SNS subscription configuration (topic ARN, protocol, endpoint, filter policy, delivery policy, subscription attributes) plus the intended operation (create, confirm, set-filter-policy, set-delivery-policy, set-attributes, delete, diagnose), OR (b) a subscription ARN + operation for live-account execution. Output: deterministic OPERATION \u002F VERDICT \u002F TARGET \u002F PRE_CHECKS \u002F STEPS \u002F POST_VERIFY \u002F NOTES block per operation, where VERDICT is one of READY, BLOCKED, COMPLETED.'\n  version: 0.1.0\n  author: Jacky Chan — AWS Community Builder\n  keywords: SNS, subscription, PendingConfirmation, ConfirmSubscription, filter policy, FilterPolicyScope, message attributes, delivery policy, retry backoff, dead-letter queue, DLQ, redrive policy, RawMessageDelivery, HTTP subscription, HTTPS subscription, SQS subscription, Lambda subscription, email subscription, firehose subscription, subscription attributes, SNS message data protection, cross-account subscription\n  tags: aws, sns, app-integration, subscription, messaging, filter-policy, delivery-policy, operate\n  keywords_tags: aws, sns, app-integration, subscription, messaging, operate\n---\n\n# SNS Subscription Operator\n\n## What this skill does\n\nExecutes SNS subscription operations correctly and safely. Runs\ndeterministic pre-checks before any state-changing CLI (topic exists,\nendpoint reachable, topic policy permits subscription, protocol valid,\nfilter-policy JSON valid, DLQ target exists for redrive), executes the\n`subscribe` \u002F `confirm-subscription` \u002F `set-subscription-attributes`\nCLI behind a CONFIRM gate, and verifies the result by confirming\n`get-subscription-attributes` returns the expected state and the\nendpoint receives a test message. Every create-subscription produces a\nconfirmation-flow note (HTTP\u002FHTTPS\u002Femail require token-based\nconfirmation; SQS\u002FLambda can be auto-confirmed if the caller owns the\nendpoint). Every filter-policy plan includes a message-attribute match\nsimulation. Every delivery-policy plan includes the retry math and DLQ\ntarget verification.\n\n## Quick navigation\n\n| Section | What it covers | When to read it |\n|---|---|---|\n| **§ Quick reference** | Verdict thresholds (BLOCKED\u002FREADY\u002FCOMPLETED) + protocol matrix | Before any operation |\n| **§ Expert heuristic** | Non-obvious rules (confirmation flow, filter-policy scope, RawMessageDelivery, redrive) | Understanding the delivery model |\n| **§ Pre-flight** | Subscription metadata gate — topic exists, endpoint reachable, policy, protocol | Before executing any CLI |\n| **§ Process** | Per-operation planning: create, confirm, set-filter, set-delivery, set-attributes, delete, diagnose | When choosing which operation |\n| **§ STRICT output contract** | Structured OPERATION\u002FVERDICT\u002FTARGET\u002FPRE_CHECKS\u002FSTEPS\u002FPOST_VERIFY\u002FNOTES template | Formatting the response |\n| **§ Anti-Patterns** | Top-5 NEVER list — common mistakes that break delivery or strand messages | Review before risky operations |\n\n## Quick reference — verdict thresholds\n\n| Verdict | Trigger condition | Action |\n|---|---|---|\n| `BLOCKED` | One or more pre-checks failed (topic does not exist, endpoint unreachable, topic policy denies subscription, invalid protocol, malformed filter-policy JSON, DLQ target does not exist for redrive, cross-account without permission) | List failures, do NOT execute |\n| `READY` | All pre-checks passed; awaiting CONFIRM gate | Emit exact CLI sequence, wait for operator yes |\n| `COMPLETED` | Operation finished and post-verification passed (`get-subscription-attributes` matches intent, test message delivered or CloudTrail event present, DLQ policy valid) | Emit verification results, monitoring plan |\n\n**Protocol matrix — confirmation requirements and capabilities:**\n\n| Protocol | Endpoint format | Confirmation required? | RawMessageDelivery | Filter policy | Delivery policy | DLQ (redrive) |\n|---|---|---|---|---|---|---|\n| `sqs` | SQS queue ARN | No (auto-confirmed if caller owns queue) | Yes (recommended) | Yes | Yes | Yes (via subscription redrive) |\n| `lambda` | Lambda function ARN | No (auto-confirmed if caller owns function) | Yes | Yes | Yes | Yes |\n| `https` | HTTPS URL | Yes (token from POST) | Yes | Yes | Yes | Yes |\n| `http` | HTTP URL | Yes (token from POST) | Yes | Yes | Yes | Yes |\n| `email` | Email address | Yes (token from email) | N\u002FA | Yes | No | No |\n| `email-json` | Email address | Yes (token from email) | N\u002FA | Yes | No | No |\n| `sms` | Phone number (E.164) | Yes (token from SMS) | N\u002FA | Yes | No | No |\n| `firehose` | Firehose ARN | No (auto-confirmed if caller owns stream) | Yes | Yes | Yes | Yes |\n| `application` | Platform endpoint ARN (mobile push) | Yes (token from push) | N\u002FA | Yes | Yes | Yes |\n\n**Priority order for pre-checks (apply in this sequence, all must pass\nfor READY):**\n\n1. **Topic reachability** — topic ARN exists (`list-topics` \u002F\n   `get-topic-attributes` does not return `NotFound`).\n2. **Protocol validity** — protocol is one of `sqs`, `lambda`, `https`,\n   `http`, `email`, `email-json`, `sms`, `firehose`, `application`.\n3. **Endpoint format** — endpoint matches the protocol's expected\n   format (SQS ARN for sqs, Lambda ARN for lambda, URL for http\u002Fhttps,\n   email for email, E.164 phone for sms, Firehose ARN for firehose).\n4. **Topic policy permission** — the topic's resource-based policy\n   allows `sns:Subscribe` for the caller's account\u002Frole. Cross-account\n   subscriptions require both sides.\n5. **Filter-policy JSON validity** — if a filter policy is specified,\n   the JSON is valid and within the 30 KB limit (SNS enforces a max\n   filter-policy size).\n6. **DLQ target exists** — if a delivery policy includes a redrive\n   policy (DLQ), the DLQ ARN exists and the topic has permission to\n   deliver to it.\n7. **Confirmation flow clarity** — for HTTP\u002FHTTPS\u002Femail\u002Fsms, the\n   operator understands that confirmation is a separate step requiring\n   token extraction. For SQS\u002FLambda\u002Ffirehose, confirmation is\n   automatic if the caller owns the endpoint.\n\n## Expert heuristic — the non-obvious rules\n\n> Moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md#expert-heuristic--the-non-obvious-rules).\n> Seven rules: auto-confirm when caller owns the endpoint, token confirmation for HTTP\u002FHTTPS\u002Femail\u002Fsms, attribute matching, FilterPolicyScope default, RawMessageDelivery, per-subscription retry override, subscription-level redrive.\n\n## Pre-flight: subscription metadata gate\n\nRun before classification. Misclassifying these produces wrong plans.\n\n**Pagination:** `list-subscriptions-by-topic` paginates at 100\u002Fpage —\ndrain `--next-token` to completion. `list-topics` paginates at 100\u002Fpage.\n\n> Moved to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md#live-account-pre-flight).\n> get-topic-attributes, list-subscriptions-by-topic, per-protocol endpoint policy checks (SQS\u002FLambda\u002FFirehose\u002FHTTP), filter-policy JSON, and DLQ validation.\n\n**Malformed input:** if the input JSON is invalid or missing required\nfields, emit `VERDICT: ERROR` with `REASON: Subscription configuration\nis not valid JSON or is missing required fields — cannot plan.` and\n`REMEDIATION: Re-fetch with aws sns list-subscriptions-by-topic\n--topic-arn \u003Carn> --output json and re-plan.`\n\n| Subscription attribute | Effect on operation |\n|---|---|\n| `PendingConfirmation: true` | Subscription not yet confirmed. For HTTP\u002FHTTPS\u002Femail\u002Fsms, extract the token and confirm. For SQS\u002FLambda\u002Ffirehose cross-account, the endpoint owner must confirm. |\n| `PendingConfirmation: false` + valid `SubscriptionArn` | Subscription confirmed and active. |\n| `FilterPolicy` set | Messages without matching attributes are NOT delivered. Verify the filter matches the publisher's message attributes. |\n| `FilterPolicyScope: MessageBody` | Filter policy matches on message body (must be valid JSON). Default is `MessageAttributes`. |\n| `RawMessageDelivery: true` | Endpoint receives only the `Message` field, not the full SNS envelope. Required for SQS-to-Lambda triggers. |\n| `DeliveryPolicy` set | Per-subscription retry and backoff. Overrides the topic-level delivery policy. |\n| `RedrivePolicy` set (DLQ) | Failed deliveries go to the specified SQS DLQ after retries are exhausted. |\n| Topic is FIFO (`*.fifo`) | Subscription must use SQS FIFO queue as endpoint. HTTP\u002FHTTPS\u002FLambda\u002Femail are NOT supported for FIFO topics. |\n| Cross-account topic | Topic policy must allow `sns:Subscribe` for the subscriber's account. Endpoint owner confirms if required. |\n\n## Process — operation planning (apply in order)\n\n### Step 0: Expert knowledge — non-obvious SNS subscription behaviors\n\n> Moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md#step-0-expert-knowledge--non-obvious-sns-subscription-behaviors).\n> 13 behaviors: two-phase confirmation, both-sides cross-account permission, silent filter drops, filter operators, body scope, raw payload shape, policy override, backoff, SQS-only DLQ, FIFO queue-only, data protection, Firehose ACTIVE, eventual consistency.\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. Topic ARN exists (`get-topic-attributes` does not return `NotFound`).\n2. Topic is not being deleted (topic `DisplayName` and `Owner` are\n   present).\n3. Calling identity has `sns:ListSubscriptionsByTopic` and\n   `sns:GetSubscriptionAttributes` on the topic ARN.\n\n**For create-subscription (`subscribe --topic-arn --protocol\n--notification-endpoint`):**\n4. Protocol is valid (`sqs`, `lambda`, `https`, `http`, `email`,\n   `email-json`, `sms`, `firehose`, `application`).\n5. Endpoint matches protocol format (ARN for sqs\u002Flambda\u002Ffirehose, URL\n   for http\u002Fhttps, email address for email, E.164 phone for sms).\n6. Topic policy allows `sns:Subscribe` for the caller (identity-based\n   OR resource-based).\n7. For SQS endpoint: queue policy allows `sqs:SendMessage` from the\n   topic ARN.\n8. For Lambda endpoint: Lambda resource policy allows\n   `lambda:InvokeFunction` from the topic ARN.\n9. For Firehose endpoint: delivery stream is `ACTIVE`.\n10. For FIFO topic: endpoint is an SQS FIFO queue.\n11. If filter policy specified: JSON is valid, within 30 KB limit.\n12. If return-subscription-arn is set: caller owns the topic OR topic\n    policy allows the caller to subscribe.\n\n**For confirm-subscription (`confirm-subscription --topic-arn\n--token`):**\n4. Token is valid (not expired — tokens are valid for 3 days).\n5. Subscription is still `pending confirmation` (not already confirmed\n   or deleted).\n\n**For set-filter-policy (`set-subscription-attributes --attribute-name\nFilterPolicy`):**\n4. Subscription ARN is confirmed (not `pending confirmation`).\n5. Filter policy JSON is valid and within 30 KB.\n6. (Optional) The publisher's message attributes match the filter —\n   run a simulation to avoid silent non-delivery.\n\n**For set-delivery-policy (`set-subscription-attributes --attribute-name\nDeliveryPolicy`):**\n4. Subscription ARN is confirmed.\n5. Delivery policy JSON is valid (retry count, backoff, delay within\n   SNS limits).\n\n**For set-redrive-policy \u002F set-dlq (`set-subscription-attributes\n--attribute-name RedrivePolicy`):**\n4. Subscription ARN is confirmed.\n5. DLQ SQS ARN exists (`get-queue-attributes` does not return\n   `QueueDoesNotExist`).\n6. DLQ queue policy allows `sqs:SendMessage` from the SNS topic ARN\n   (or the SNS service principal).\n7. DLQ is NOT the same queue as the subscription endpoint (creates a\n   loop).\n\n**For diagnose-subscription (read-only):**\n4. Read `get-subscription-attributes`, CloudTrail events, and the\n   failure-mode table to identify why messages are not delivered.\n\n**Subscription failure-mode table (use during diagnose):**\n\n| Symptom | Root cause | Fix |\n|---|---|---|\n| `get-subscription-attributes` shows `PendingConfirmation: true` | HTTP\u002FHTTPS\u002Femail\u002Fsms subscription not confirmed | Extract the token from the confirmation message and call `confirm-subscription` |\n| Subscription confirmed but no messages received | Filter policy does not match publisher's message attributes | Verify message attributes match the filter policy; use `FilterPolicyScope` correctly |\n| Subscription confirmed but no messages received (no filter policy) | Topic message data protection policy denying messages | Check topic `getDataProtectionPolicy`; the policy may audit, mask, or deny messages |\n| SQS endpoint not receiving messages | Queue policy does not allow `sqs:SendMessage` from the topic ARN | Add `sqs:SendMessage` permission for the topic ARN to the queue policy |\n| Lambda endpoint not invoked | Lambda resource policy does not allow `lambda:InvokeFunction` from the topic ARN | Add `lambda:InvokeFunction` permission for the topic ARN (or re-add the trigger via the console) |\n| HTTP endpoint returns 4xx\u002F5xx | Endpoint is not handling SNS POST correctly (must return 200) | Verify the endpoint returns 200 for SNS POST; check for certificate issues on HTTPS |\n| Messages go to DLQ immediately | Delivery policy retries exhausted (endpoint consistently failing) | Fix the endpoint first, then replay from DLQ |\n| `subscribe` returns `AuthorizationError` | Topic policy denies caller `sns:Subscribe` | Add `sns:Subscribe` to the topic policy for the caller's account |\n| `subscribe` cross-account fails | Endpoint owner has not confirmed OR topic policy does not allow cross-account subscription | Both sides must have permission; confirm with `confirm-subscription` if needed |\n| FIFO topic subscription fails with `InvalidParameter` | Endpoint is not an SQS FIFO queue | Use an SQS FIFO queue (`.fifo` suffix) for FIFO topic subscriptions |\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.\n- The expected confirmation flow (auto-confirmed for SQS\u002FLambda\u002Ffirehose\n  owned by caller; token-based for HTTP\u002FHTTPS\u002Femail\u002Fsms).\n- The expected side-effects (subscription created, filter policy applied,\n  delivery policy set, DLQ configured).\n- The CONFIRM gate prompt.\n- The verification step (`get-subscription-attributes` + test message\n  or CloudTrail event).\n\n### Step 3: Execute behind CONFIRM gate\n\n- **MANDATORY CONFIRMATION GATE.** Before any state-changing CLI\n  (`subscribe`, `confirm-subscription`, `set-subscription-attributes`,\n  `unsubscribe`), emit: `CONFIRM: About to \u003Coperation> on SNS topic\n  \u003Ctopic-arn> (subscription \u003Csub-arn-or-\"new\">). This will\n  \u003Cconsequence>. Proceed? (yes\u002Fno)`. Do NOT execute until the operator\n  confirms.\n- Capture pre-state for rollback: `aws sns\n  get-subscription-attributes --subscription-arn \u003Carn> --output json >\n  \u002Ftmp\u002F\u003Csub-arn>-pre-$(date +%s).json`.\n- Execute the CLI. `subscribe` returns immediately; for HTTP\u002FHTTPS\u002F\n  email\u002Fsms, the confirmation step follows.\n\n### Step 4: Post-verification — COMPLETED\n\nAfter the CLI completes, run post-verification. ALL checks must pass\nfor `COMPLETED`.\n\n1. `get-subscription-attributes --subscription-arn \u003Carn>` — confirm\n   the attribute matches intent (FilterPolicy, DeliveryPolicy,\n   RedrivePolicy, RawMessageDelivery).\n2. For create-subscription: confirm `PendingConfirmation: false` and a\n   valid `SubscriptionArn` (not `\"pending confirmation\"`).\n3. For filter-policy changes: publish a test message with the expected\n   attributes and confirm the endpoint receives it.\n4. For DLQ: publish a message that fails delivery (e.g., endpoint\n   down) and confirm the message lands in the DLQ after retries.\n5. CloudTrail shows the `Subscribe` \u002F `ConfirmSubscription` \u002F\n   `SetSubscriptionAttributes` event with the topic ARN and caller.\n6. Spot-check: the endpoint (SQS queue, Lambda function, HTTP server)\n   receives a test message published to the topic.\n\nIf ANY verification fails, emit `VERDICT: ERROR` with the failure\ndetails — do not claim COMPLETED.\n\n## STRICT output contract (per operation)\n\n```text\nOPERATION: \u003Ccreate | confirm | set-filter-policy | set-delivery-policy | set-redrive-policy | set-attributes | delete | diagnose>\nVERDICT: READY | BLOCKED | COMPLETED\nTARGET: \u003Ctopic-arn> (subscription: \u003Csub-arn-or-\"new\">, protocol: \u003Cprotocol>, endpoint: \u003Cendpoint-or-\"masked\">, 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: \u003Cconfirmation flow, filter-policy match, retry config, DLQ, caveats>\n```\n\n### Worked example — create SQS subscription with filter policy\n\n```text\nOPERATION: create\nVERDICT: READY\nTARGET: arn:aws:sns:us-east-1:111111111111:order-events (subscription:\n        new, protocol: sqs, endpoint:\n        arn:aws:sqs:us-east-1:111111111111:order-processing-queue,\n        account 111111111111, region us-east-1)\nPRE_CHECKS:\n  - [PASS] Topic exists (arn:aws:sns:us-east-1:111111111111:order-events)\n  - [PASS] Protocol sqs valid\n  - [PASS] Endpoint is a valid SQS ARN\n  - [PASS] Topic policy allows sns:Subscribe for caller account\n  - [PASS] Queue policy allows sqs:SendMessage from topic ARN\n  - [PASS] Filter policy JSON valid ({\"event_type\": [\"order_created\",\n    \"order_updated\"]}, 48 bytes \u003C 30 KB limit)\n  - [PASS] Caller owns the SQS queue (auto-confirmation applies)\nSTEPS:\n  1. CONFIRM: About to create an SNS subscription on topic\n     arn:aws:sns:us-east-1:111111111111:order-events, protocol sqs,\n     endpoint arn:aws:sqs:us-east-1:111111111111:order-processing-queue.\n     Filter policy: {\"event_type\": [\"order_created\", \"order_updated\"]}.\n     RawMessageDelivery: true. Auto-confirmation applies (caller owns\n     the queue). Proceed? (yes\u002Fno)\n  2. aws sns subscribe \\\n       --topic-arn arn:aws:sns:us-east-1:111111111111:order-events \\\n       --protocol sqs \\\n       --notification-endpoint arn:aws:sqs:us-east-1:111111111111:order-processing-queue \\\n       --attributes file:\u002F\u002Fattrs.json\n     # attrs.json:\n     # {\"FilterPolicy\": \"{\\\"event_type\\\": [\\\"order_created\\\", \\\"order_updated\\\"]}\",\n     #  \"RawMessageDelivery\": \"true\"}\n  3. Capture the returned SubscriptionArn for verification.\nPOST_VERIFY: (pending execution)\nNOTES:\n  - Auto-confirmation applies because the caller owns the SQS queue.\n    The SubscriptionArn is returned immediately — no token step needed.\n  - Filter policy: only messages with message attribute event_type in\n    [order_created, order_updated] will be delivered. Messages without\n    this attribute are silently dropped (by design).\n  - RawMessageDelivery: true — the queue receives only the Message body,\n    not the full SNS envelope. The Lambda trigger on this queue will\n    receive the message body directly.\n  - Delivery policy: default (4 retries over 1 hour, exponential backoff).\n    To customize, use set-subscription-attributes --attribute-name\n    DeliveryPolicy after creation.\n```\n\n### Worked example — diagnose subscription not receiving messages\n\n> Moved to [references\u002Fworked-examples.md](references\u002Fworked-examples.md#worked-example--diagnose-subscription-not-receiving-messages).\n> COMPLETED diagnose block: attribute-name mismatch (filter 'event_type' vs publisher 'type'), fixed FilterPolicy plus test publish.\n\n### Worked example — set delivery policy with DLQ\n\n> Moved to [references\u002Fworked-examples.md](references\u002Fworked-examples.md#worked-example--set-delivery-policy-with-dlq).\n> READY block: 5-retry exponential DeliveryPolicy plus RedrivePolicy DLQ with same-queue loop check.\n\n### Worked example — cross-account subscription BLOCKED\n\n> Moved to [references\u002Fworked-examples.md](references\u002Fworked-examples.md#worked-example--cross-account-subscription-blocked).\n> BLOCKED block: cross-account missing sns:Subscribe on the topic and sqs:SendMessage on the queue — both sides must be fixed.\n\n## Anti-Patterns — NEVER (top 5)\n\nThese are the five highest-impact mistakes. Each one silently breaks\nmessage delivery or creates a security exposure.\n\n1. **NEVER assume a subscription is delivering messages just because\n   the subscription exists.** A subscription in `PendingConfirmation`\n   state (HTTP\u002FHTTPS\u002Femail\u002Fsms) receives ZERO messages until confirmed.\n   Always verify `PendingConfirmation: false` before expecting delivery.\n   SQS\u002FLambda\u002Ffirehose subscriptions owned by the caller are auto-\n   confirmed; cross-account endpoints are NOT.\n\n2. **NEVER set a filter policy without verifying the publisher's\n   message attribute names.** The #1 cause of SNS non-delivery is an\n   attribute name mismatch between the filter policy and the publisher.\n   The filter silently drops non-matching messages — no error, no\n   CloudTrail event, no DLQ delivery. Always run a test publish after\n   setting a filter policy.\n\n3. **NEVER configure a subscription DLQ (redrive) pointing to the same\n   SQS queue as the subscription endpoint.** This creates a delivery\n   loop: failed messages go to the DLQ (which is the same queue), get\n   retried, fail again, and loop forever. Always verify the DLQ ARN is\n   different from the endpoint ARN.\n\n4. **NEVER leave the topic policy allowing `sns:Subscribe` from `*`\n   (all principals) in production.** This allows any AWS account to\n   subscribe to the topic and exfiltrate messages. Restrict\n   `sns:Subscribe` to specific accounts or roles. Use SNS message data\n   protection to audit for overly permissive topic policies.\n\n5. **NEVER use `unsubscribe` without capturing the subscription\n   attributes first.** Unsubscribing is irreversible — the subscription\n   ARN, filter policy, delivery policy, and DLQ configuration are all\n   lost. If the subscription needs to be recreated, all attributes must\n   be reconfigured. Always emit `CONFIRM:` before `unsubscribe`.\n\n## Edge-case handling\n\n> Moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md#edge-case-handling).\n> 403 on confirmation POST, FIFO+Lambda unsupported, Firehose stream CREATING, data-protection Deny.\n\n## Pre-flight safety checks (run before any remediation CLI)\n\n- **MANDATORY CONFIRMATION GATE.** Before any state-changing operation\n  (`subscribe`, `confirm-subscription`, `set-subscription-attributes`,\n  `unsubscribe`), emit: `CONFIRM: About to \u003Coperation> on SNS topic\n  \u003Ctopic-arn> (subscription \u003Csub-arn>). This will \u003Cconsequence>. Proceed?\n  (yes\u002Fno)`. Do NOT execute until the operator confirms.\n\n- **Capture pre-state for audit.** Before any subscription operation:\n  `aws sns get-subscription-attributes --subscription-arn \u003Carn>\n  --output json > \u002Ftmp\u002F\u003Csub-id>-pre-$(date +%s).json`.\n\n- **Verify topic policy before cross-account subscription.** The topic\n  policy must explicitly allow `sns:Subscribe` for the subscriber's\n  account. A missing permission produces `AuthorizationError`.\n\n- **Verify endpoint policy before creating the subscription.** For SQS\n  endpoints: the queue policy must allow `sqs:SendMessage` from the\n  topic ARN. For Lambda: the resource policy must allow\n  `lambda:InvokeFunction` from the topic ARN.\n\n- **Verify the DLQ is not the same as the endpoint.** A redrive policy\n  pointing to the same SQS queue as the subscription endpoint creates\n  an infinite retry loop.\n\n- **Verify the filter policy JSON before applying.** Malformed JSON or\n  attribute names that don't match the publisher produce silent non-\n  delivery. Run a test publish after applying.\n\n## Recent AWS features (2024-2026)\n\n> Moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md#recent-aws-features-2024-2026).\n> Firehose protocol, message data protection, MessageBody filter scope, FIFO expansion, PublishBatch, cross-account CloudTrail delivery logging.\n\n## References (load on demand)\n\n- [advanced-patterns](references\u002Fadvanced-patterns.md) — Expert heuristic seven rules, Step 0 expert knowledge, edge-case handling, Recent AWS features\n- [diagnostic-commands](references\u002Fdiagnostic-commands.md) — live-account pre-flight commands moved from SKILL.md\n- [subscription-confirmation-and-delivery](references\u002Fsubscription-confirmation-and-delivery.md) — confirmation flows and delivery retry detail\n- [subscription-protocols-and-attributes](references\u002Fsubscription-protocols-and-attributes.md) — per-protocol endpoint formats and subscription attributes\n- [worked-examples](references\u002Fworked-examples.md) — diagnose, delivery-policy-with-DLQ, and cross-account BLOCKED worked examples moved from SKILL.md\n\n## Domain\n\nAWS CloudOps \u002F SNS Subscription Operations & App Integration.\n\n## AWS documentation\n\n- **Amazon SNS Developer Guide** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fsns\u002Flatest\u002Fdg\u002F\n- **SNS subscription operations** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fsns\u002Flatest\u002Fdg\u002Fsns-subscription-operations.html\n- **SNS filter policies** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fsns\u002Flatest\u002Fdg\u002Fsns-message-filtering.html\n- **SNS delivery policies** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fsns\u002Flatest\u002Fdg\u002Fsns-message-delivery-retries.html\n- **SNS dead-letter queues** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fsns\u002Flatest\u002Fdg\u002Fsns-dead-letter-queues.html\n- **SNS message data protection** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fsns\u002Flatest\u002Fdg\u002Fsns-data-protection.html\n- **SNS FIFO topics** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fsns\u002Flatest\u002Fdg\u002Ffifo-message-delivery.html\n","# SNS Subscription Operator\n\n## What this skill does\n\nExecutes SNS subscription operations correctly and safely. Runs\ndeterministic pre-checks before any state-changing CLI (topic exists,\nendpoint reachable, topic policy permits subscription, protocol valid,\nfilter-policy JSON valid, DLQ target exists for redrive), executes the\n`subscribe` \u002F `confirm-subscription` \u002F `set-subscription-attributes`\nCLI behind a CONFIRM gate, and verifies the result by confirming\n`get-subscription-attributes` returns the expected state and the\nendpoint receives a test message. Every create-subscription produces a\nconfirmation-flow note (HTTP\u002FHTTPS\u002Femail require token-based\nconfirmation; SQS\u002FLambda can be auto-confirmed if the caller owns the\nendpoint). Every filter-policy plan includes a message-attribute match\nsimulation. Every delivery-policy plan includes the retry math and DLQ\ntarget verification.\n\n## Quick navigation\n\n| Section | What it covers | When to read it |\n|---|---|---|\n| **§ Quick reference** | Verdict thresholds (BLOCKED\u002FREADY\u002FCOMPLETED) + protocol matrix | Before any operation |\n| **§ Expert heuristic** | Non-obvious rules (confirmation flow, filter-policy scope, RawMessageDelivery, redrive) | Understanding the delivery model |\n| **§ Pre-flight** | Subscription metadata gate — topic exists, endpoint reachable, policy, protocol | Before executing any CLI |\n| **§ Process** | Per-operation planning: create, confirm, set-filter, set-delivery, set-attributes, delete, diagnose | When choosing which operation |\n| **§ STRICT output contract** | Structured OPERATION\u002FVERDICT\u002FTARGET\u002FPRE_CHECKS\u002FSTEPS\u002FPOST_VERIFY\u002FNOTES template | Formatting the response |\n| **§ Anti-Patterns** | Top-5 NEVER list — common mistakes that break delivery or strand messages | Review before risky operations |\n\n## Quick reference — verdict thresholds\n\n| Verdict | Trigger condition | Action |\n|---|---|---|\n| `BLOCKED` | One or more pre-checks failed (topic does not exist, endpoint unreachable, topic policy denies subscription, invalid protocol, malformed filter-policy JSON, DLQ target does not exist for redrive, cross-account without permission) | List failures, do NOT execute |\n| `READY` | All pre-checks passed; awaiting CONFIRM gate | Emit exact CLI sequence, wait for operator yes |\n| `COMPLETED` | Operation finished and post-verification passed (`get-subscription-attributes` matches intent, test message delivered or CloudTrail event present, DLQ policy valid) | Emit verification results, monitoring plan |\n\n**Protocol matrix — confirmation requirements and capabilities:**\n\n| Protocol | Endpoint format | Confirmation required? | RawMessageDelivery | Filter policy | Delivery policy | DLQ (redrive) |\n|---|---|---|---|---|---|---|\n| `sqs` | SQS queue ARN | No (auto-confirmed if caller owns queue) | Yes (recommended) | Yes | Yes | Yes (via subscription redrive) |\n| `lambda` | Lambda function ARN | No (auto-confirmed if caller owns function) | Yes | Yes | Yes | Yes |\n| `https` | HTTPS URL | Yes (token from POST) | Yes | Yes | Yes | Yes |\n| `http` | HTTP URL | Yes (token from POST) | Yes | Yes | Yes | Yes |\n| `email` | Email address | Yes (token from email) | N\u002FA | Yes | No | No |\n| `email-json` | Email address | Yes (token from email) | N\u002FA | Yes | No | No |\n| `sms` | Phone number (E.164) | Yes (token from SMS) | N\u002FA | Yes | No | No |\n| `firehose` | Firehose ARN | No (auto-confirmed if caller owns stream) | Yes | Yes | Yes | Yes |\n| `application` | Platform endpoint ARN (mobile push) | Yes (token from push) | N\u002FA | Yes | Yes | Yes |\n\n**Priority order for pre-checks (apply in this sequence, all must pass\nfor READY):**\n\n1. **Topic reachability** — topic ARN exists (`list-topics` \u002F\n   `get-topic-attributes` does not return `NotFound`).\n2. **Protocol validity** — protocol is one of `sqs`, `lambda`, `https`,\n   `http`, `email`, `email-json`, `sms`, `firehose`, `application`.\n3. **Endpoint format** — endpoint matches the protocol's expected\n   format (SQS ARN for sqs, Lambda ARN for lambda, URL for http\u002Fhttps,\n   email for email, E.164 phone for sms, Firehose ARN for firehose).\n4. **Topic policy permission** — the topic's resource-based policy\n   allows `sns:Subscribe` for the caller's account\u002Frole. Cross-account\n   subscriptions require both sides.\n5. **Filter-policy JSON validity** — if a filter policy is specified,\n   the JSON is valid and within the 30 KB limit (SNS enforces a max\n   filter-policy size).\n6. **DLQ target exists** — if a delivery policy includes a redrive\n   policy (DLQ), the DLQ ARN exists and the topic has permission to\n   deliver to it.\n7. **Confirmation flow clarity** — for HTTP\u002FHTTPS\u002Femail\u002Fsms, the\n   operator understands that confirmation is a separate step requiring\n   token extraction. For SQS\u002FLambda\u002Ffirehose, confirmation is\n   automatic if the caller owns the endpoint.\n\n## Expert heuristic — the non-obvious rules\n\n> Moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md#expert-heuristic--the-non-obvious-rules).\n> Seven rules: auto-confirm when caller owns the endpoint, token confirmation for HTTP\u002FHTTPS\u002Femail\u002Fsms, attribute matching, FilterPolicyScope default, RawMessageDelivery, per-subscription retry override, subscription-level redrive.\n\n## Pre-flight: subscription metadata gate\n\nRun before classification. Misclassifying these produces wrong plans.\n\n**Pagination:** `list-subscriptions-by-topic` paginates at 100\u002Fpage —\ndrain `--next-token` to completion. `list-topics` paginates at 100\u002Fpage.\n\n> Moved to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md#live-account-pre-flight).\n> get-topic-attributes, list-subscriptions-by-topic, per-protocol endpoint policy checks (SQS\u002FLambda\u002FFirehose\u002FHTTP), filter-policy JSON, and DLQ validation.\n\n**Malformed input:** if the input JSON is invalid or missing required\nfields, emit `VERDICT: ERROR` with `REASON: Subscription configuration\nis not valid JSON or is missing required fields — cannot plan.` and\n`REMEDIATION: Re-fetch with aws sns list-subscriptions-by-topic\n--topic-arn \u003Carn> --output json and re-plan.`\n\n| Subscription attribute | Effect on operation |\n|---|---|\n| `PendingConfirmation: true` | Subscription not yet confirmed. For HTTP\u002FHTTPS\u002Femail\u002Fsms, extract the token and confirm. For SQS\u002FLambda\u002Ffirehose cross-account, the endpoint owner must confirm. |\n| `PendingConfirmation: false` + valid `SubscriptionArn` | Subscription confirmed and active. |\n| `FilterPolicy` set | Messages without matching attributes are NOT delivered. Verify the filter matches the publisher's message attributes. |\n| `FilterPolicyScope: MessageBody` | Filter policy matches on message body (must be valid JSON). Default is `MessageAttributes`. |\n| `RawMessageDelivery: true` | Endpoint receives only the `Message` field, not the full SNS envelope. Required for SQS-to-Lambda triggers. |\n| `DeliveryPolicy` set | Per-subscription retry and backoff. Overrides the topic-level delivery policy. |\n| `RedrivePolicy` set (DLQ) | Failed deliveries go to the specified SQS DLQ after retries are exhausted. |\n| Topic is FIFO (`*.fifo`) | Subscription must use SQS FIFO queue as endpoint. HTTP\u002FHTTPS\u002FLambda\u002Femail are NOT supported for FIFO topics. |\n| Cross-account topic | Topic policy must allow `sns:Subscribe` for the subscriber's account. Endpoint owner confirms if required. |\n\n## Process — operation planning (apply in order)\n\n### Step 0: Expert knowledge — non-obvious SNS subscription behaviors\n\n> Moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md#step-0-expert-knowledge--non-obvious-sns-subscription-behaviors).\n> 13 behaviors: two-phase confirmation, both-sides cross-account permission, silent filter drops, filter operators, body scope, raw payload shape, policy override, backoff, SQS-only DLQ, FIFO queue-only, data protection, Firehose ACTIVE, eventual consistency.\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. Topic ARN exists (`get-topic-attributes` does not return `NotFound`).\n2. Topic is not being deleted (topic `DisplayName` and `Owner` are\n   present).\n3. Calling identity has `sns:ListSubscriptionsByTopic` and\n   `sns:GetSubscriptionAttributes` on the topic ARN.\n\n**For create-subscription (`subscribe --topic-arn --protocol\n--notification-endpoint`):**\n4. Protocol is valid (`sqs`, `lambda`, `https`, `http`, `email`,\n   `email-json`, `sms`, `firehose`, `application`).\n5. Endpoint matches protocol format (ARN for sqs\u002Flambda\u002Ffirehose, URL\n   for http\u002Fhttps, email address for email, E.164 phone for sms).\n6. Topic policy allows `sns:Subscribe` for the caller (identity-based\n   OR resource-based).\n7. For SQS endpoint: queue policy allows `sqs:SendMessage` from the\n   topic ARN.\n8. For Lambda endpoint: Lambda resource policy allows\n   `lambda:InvokeFunction` from the topic ARN.\n9. For Firehose endpoint: delivery stream is `ACTIVE`.\n10. For FIFO topic: endpoint is an SQS FIFO queue.\n11. If filter policy specified: JSON is valid, within 30 KB limit.\n12. If return-subscription-arn is set: caller owns the topic OR topic\n    policy allows the caller to subscribe.\n\n**For confirm-subscription (`confirm-subscription --topic-arn\n--token`):**\n4. Token is valid (not expired — tokens are valid for 3 days).\n5. Subscription is still `pending confirmation` (not already confirmed\n   or deleted).\n\n**For set-filter-policy (`set-subscription-attributes --attribute-name\nFilterPolicy`):**\n4. Subscription ARN is confirmed (not `pending confirmation`).\n5. Filter policy JSON is valid and within 30 KB.\n6. (Optional) The publisher's message attributes match the filter —\n   run a simulation to avoid silent non-delivery.\n\n**For set-delivery-policy (`set-subscription-attributes --attribute-name\nDeliveryPolicy`):**\n4. Subscription ARN is confirmed.\n5. Delivery policy JSON is valid (retry count, backoff, delay within\n   SNS limits).\n\n**For set-redrive-policy \u002F set-dlq (`set-subscription-attributes\n--attribute-name RedrivePolicy`):**\n4. Subscription ARN is confirmed.\n5. DLQ SQS ARN exists (`get-queue-attributes` does not return\n   `QueueDoesNotExist`).\n6. DLQ queue policy allows `sqs:SendMessage` from the SNS topic ARN\n   (or the SNS service principal).\n7. DLQ is NOT the same queue as the subscription endpoint (creates a\n   loop).\n\n**For diagnose-subscription (read-only):**\n4. Read `get-subscription-attributes`, CloudTrail events, and the\n   failure-mode table to identify why messages are not delivered.\n\n**Subscription failure-mode table (use during diagnose):**\n\n| Symptom | Root cause | Fix |\n|---|---|---|\n| `get-subscription-attributes` shows `PendingConfirmation: true` | HTTP\u002FHTTPS\u002Femail\u002Fsms subscription not confirmed | Extract the token from the confirmation message and call `confirm-subscription` |\n| Subscription confirmed but no messages received | Filter policy does not match publisher's message attributes | Verify message attributes match the filter policy; use `FilterPolicyScope` correctly |\n| Subscription confirmed but no messages received (no filter policy) | Topic message data protection policy denying messages | Check topic `getDataProtectionPolicy`; the policy may audit, mask, or deny messages |\n| SQS endpoint not receiving messages | Queue policy does not allow `sqs:SendMessage` from the topic ARN | Add `sqs:SendMessage` permission for the topic ARN to the queue policy |\n| Lambda endpoint not invoked | Lambda resource policy does not allow `lambda:InvokeFunction` from the topic ARN | Add `lambda:InvokeFunction` permission for the topic ARN (or re-add the trigger via the console) |\n| HTTP endpoint returns 4xx\u002F5xx | Endpoint is not handling SNS POST correctly (must return 200) | Verify the endpoint returns 200 for SNS POST; check for certificate issues on HTTPS |\n| Messages go to DLQ immediately | Delivery policy retries exhausted (endpoint consistently failing) | Fix the endpoint first, then replay from DLQ |\n| `subscribe` returns `AuthorizationError` | Topic policy denies caller `sns:Subscribe` | Add `sns:Subscribe` to the topic policy for the caller's account |\n| `subscribe` cross-account fails | Endpoint owner has not confirmed OR topic policy does not allow cross-account subscription | Both sides must have permission; confirm with `confirm-subscription` if needed |\n| FIFO topic subscription fails with `InvalidParameter` | Endpoint is not an SQS FIFO queue | Use an SQS FIFO queue (`.fifo` suffix) for FIFO topic subscriptions |\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.\n- The expected confirmation flow (auto-confirmed for SQS\u002FLambda\u002Ffirehose\n  owned by caller; token-based for HTTP\u002FHTTPS\u002Femail\u002Fsms).\n- The expected side-effects (subscription created, filter policy applied,\n  delivery policy set, DLQ configured).\n- The CONFIRM gate prompt.\n- The verification step (`get-subscription-attributes` + test message\n  or CloudTrail event).\n\n### Step 3: Execute behind CONFIRM gate\n\n- **MANDATORY CONFIRMATION GATE.** Before any state-changing CLI\n  (`subscribe`, `confirm-subscription`, `set-subscription-attributes`,\n  `unsubscribe`), emit: `CONFIRM: About to \u003Coperation> on SNS topic\n  \u003Ctopic-arn> (subscription \u003Csub-arn-or-\"new\">). This will\n  \u003Cconsequence>. Proceed? (yes\u002Fno)`. Do NOT execute until the operator\n  confirms.\n- Capture pre-state for rollback: `aws sns\n  get-subscription-attributes --subscription-arn \u003Carn> --output json >\n  \u002Ftmp\u002F\u003Csub-arn>-pre-$(date +%s).json`.\n- Execute the CLI. `subscribe` returns immediately; for HTTP\u002FHTTPS\u002F\n  email\u002Fsms, the confirmation step follows.\n\n### Step 4: Post-verification — COMPLETED\n\nAfter the CLI completes, run post-verification. ALL checks must pass\nfor `COMPLETED`.\n\n1. `get-subscription-attributes --subscription-arn \u003Carn>` — confirm\n   the attribute matches intent (FilterPolicy, DeliveryPolicy,\n   RedrivePolicy, RawMessageDelivery).\n2. For create-subscription: confirm `PendingConfirmation: false` and a\n   valid `SubscriptionArn` (not `\"pending confirmation\"`).\n3. For filter-policy changes: publish a test message with the expected\n   attributes and confirm the endpoint receives it.\n4. For DLQ: publish a message that fails delivery (e.g., endpoint\n   down) and confirm the message lands in the DLQ after retries.\n5. CloudTrail shows the `Subscribe` \u002F `ConfirmSubscription` \u002F\n   `SetSubscriptionAttributes` event with the topic ARN and caller.\n6. Spot-check: the endpoint (SQS queue, Lambda function, HTTP server)\n   receives a test message published to the topic.\n\nIf ANY verification fails, emit `VERDICT: ERROR` with the failure\ndetails — do not claim COMPLETED.\n\n## STRICT output contract (per operation)\n\n```text\nOPERATION: \u003Ccreate | confirm | set-filter-policy | set-delivery-policy | set-redrive-policy | set-attributes | delete | diagnose>\nVERDICT: READY | BLOCKED | COMPLETED\nTARGET: \u003Ctopic-arn> (subscription: \u003Csub-arn-or-\"new\">, protocol: \u003Cprotocol>, endpoint: \u003Cendpoint-or-\"masked\">, 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: \u003Cconfirmation flow, filter-policy match, retry config, DLQ, caveats>\n```\n\n### Worked example — create SQS subscription with filter policy\n\n```text\nOPERATION: create\nVERDICT: READY\nTARGET: arn:aws:sns:us-east-1:111111111111:order-events (subscription:\n        new, protocol: sqs, endpoint:\n        arn:aws:sqs:us-east-1:111111111111:order-processing-queue,\n        account 111111111111, region us-east-1)\nPRE_CHECKS:\n  - [PASS] Topic exists (arn:aws:sns:us-east-1:111111111111:order-events)\n  - [PASS] Protocol sqs valid\n  - [PASS] Endpoint is a valid SQS ARN\n  - [PASS] Topic policy allows sns:Subscribe for caller account\n  - [PASS] Queue policy allows sqs:SendMessage from topic ARN\n  - [PASS] Filter policy JSON valid ({\"event_type\": [\"order_created\",\n    \"order_updated\"]}, 48 bytes \u003C 30 KB limit)\n  - [PASS] Caller owns the SQS queue (auto-confirmation applies)\nSTEPS:\n  1. CONFIRM: About to create an SNS subscription on topic\n     arn:aws:sns:us-east-1:111111111111:order-events, protocol sqs,\n     endpoint arn:aws:sqs:us-east-1:111111111111:order-processing-queue.\n     Filter policy: {\"event_type\": [\"order_created\", \"order_updated\"]}.\n     RawMessageDelivery: true. Auto-confirmation applies (caller owns\n     the queue). Proceed? (yes\u002Fno)\n  2. aws sns subscribe \\\n       --topic-arn arn:aws:sns:us-east-1:111111111111:order-events \\\n       --protocol sqs \\\n       --notification-endpoint arn:aws:sqs:us-east-1:111111111111:order-processing-queue \\\n       --attributes file:\u002F\u002Fattrs.json\n     # attrs.json:\n     # {\"FilterPolicy\": \"{\\\"event_type\\\": [\\\"order_created\\\", \\\"order_updated\\\"]}\",\n     #  \"RawMessageDelivery\": \"true\"}\n  3. Capture the returned SubscriptionArn for verification.\nPOST_VERIFY: (pending execution)\nNOTES:\n  - Auto-confirmation applies because the caller owns the SQS queue.\n    The SubscriptionArn is returned immediately — no token step needed.\n  - Filter policy: only messages with message attribute event_type in\n    [order_created, order_updated] will be delivered. Messages without\n    this attribute are silently dropped (by design).\n  - RawMessageDelivery: true — the queue receives only the Message body,\n    not the full SNS envelope. The Lambda trigger on this queue will\n    receive the message body directly.\n  - Delivery policy: default (4 retries over 1 hour, exponential backoff).\n    To customize, use set-subscription-attributes --attribute-name\n    DeliveryPolicy after creation.\n```\n\n### Worked example — diagnose subscription not receiving messages\n\n> Moved to [references\u002Fworked-examples.md](references\u002Fworked-examples.md#worked-example--diagnose-subscription-not-receiving-messages).\n> COMPLETED diagnose block: attribute-name mismatch (filter 'event_type' vs publisher 'type'), fixed FilterPolicy plus test publish.\n\n### Worked example — set delivery policy with DLQ\n\n> Moved to [references\u002Fworked-examples.md](references\u002Fworked-examples.md#worked-example--set-delivery-policy-with-dlq).\n> READY block: 5-retry exponential DeliveryPolicy plus RedrivePolicy DLQ with same-queue loop check.\n\n### Worked example — cross-account subscription BLOCKED\n\n> Moved to [references\u002Fworked-examples.md](references\u002Fworked-examples.md#worked-example--cross-account-subscription-blocked).\n> BLOCKED block: cross-account missing sns:Subscribe on the topic and sqs:SendMessage on the queue — both sides must be fixed.\n\n## Anti-Patterns — NEVER (top 5)\n\nThese are the five highest-impact mistakes. Each one silently breaks\nmessage delivery or creates a security exposure.\n\n1. **NEVER assume a subscription is delivering messages just because\n   the subscription exists.** A subscription in `PendingConfirmation`\n   state (HTTP\u002FHTTPS\u002Femail\u002Fsms) receives ZERO messages until confirmed.\n   Always verify `PendingConfirmation: false` before expecting delivery.\n   SQS\u002FLambda\u002Ffirehose subscriptions owned by the caller are auto-\n   confirmed; cross-account endpoints are NOT.\n\n2. **NEVER set a filter policy without verifying the publisher's\n   message attribute names.** The #1 cause of SNS non-delivery is an\n   attribute name mismatch between the filter policy and the publisher.\n   The filter silently drops non-matching messages — no error, no\n   CloudTrail event, no DLQ delivery. Always run a test publish after\n   setting a filter policy.\n\n3. **NEVER configure a subscription DLQ (redrive) pointing to the same\n   SQS queue as the subscription endpoint.** This creates a delivery\n   loop: failed messages go to the DLQ (which is the same queue), get\n   retried, fail again, and loop forever. Always verify the DLQ ARN is\n   different from the endpoint ARN.\n\n4. **NEVER leave the topic policy allowing `sns:Subscribe` from `*`\n   (all principals) in production.** This allows any AWS account to\n   subscribe to the topic and exfiltrate messages. Restrict\n   `sns:Subscribe` to specific accounts or roles. Use SNS message data\n   protection to audit for overly permissive topic policies.\n\n5. **NEVER use `unsubscribe` without capturing the subscription\n   attributes first.** Unsubscribing is irreversible — the subscription\n   ARN, filter policy, delivery policy, and DLQ configuration are all\n   lost. If the subscription needs to be recreated, all attributes must\n   be reconfigured. Always emit `CONFIRM:` before `unsubscribe`.\n\n## Edge-case handling\n\n> Moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md#edge-case-handling).\n> 403 on confirmation POST, FIFO+Lambda unsupported, Firehose stream CREATING, data-protection Deny.\n\n## Pre-flight safety checks (run before any remediation CLI)\n\n- **MANDATORY CONFIRMATION GATE.** Before any state-changing operation\n  (`subscribe`, `confirm-subscription`, `set-subscription-attributes`,\n  `unsubscribe`), emit: `CONFIRM: About to \u003Coperation> on SNS topic\n  \u003Ctopic-arn> (subscription \u003Csub-arn>). This will \u003Cconsequence>. Proceed?\n  (yes\u002Fno)`. Do NOT execute until the operator confirms.\n\n- **Capture pre-state for audit.** Before any subscription operation:\n  `aws sns get-subscription-attributes --subscription-arn \u003Carn>\n  --output json > \u002Ftmp\u002F\u003Csub-id>-pre-$(date +%s).json`.\n\n- **Verify topic policy before cross-account subscription.** The topic\n  policy must explicitly allow `sns:Subscribe` for the subscriber's\n  account. A missing permission produces `AuthorizationError`.\n\n- **Verify endpoint policy before creating the subscription.** For SQS\n  endpoints: the queue policy must allow `sqs:SendMessage` from the\n  topic ARN. For Lambda: the resource policy must allow\n  `lambda:InvokeFunction` from the topic ARN.\n\n- **Verify the DLQ is not the same as the endpoint.** A redrive policy\n  pointing to the same SQS queue as the subscription endpoint creates\n  an infinite retry loop.\n\n- **Verify the filter policy JSON before applying.** Malformed JSON or\n  attribute names that don't match the publisher produce silent non-\n  delivery. Run a test publish after applying.\n\n## Recent AWS features (2024-2026)\n\n> Moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md#recent-aws-features-2024-2026).\n> Firehose protocol, message data protection, MessageBody filter scope, FIFO expansion, PublishBatch, cross-account CloudTrail delivery logging.\n\n## References (load on demand)\n\n- [advanced-patterns](references\u002Fadvanced-patterns.md) — Expert heuristic seven rules, Step 0 expert knowledge, edge-case handling, Recent AWS features\n- [diagnostic-commands](references\u002Fdiagnostic-commands.md) — live-account pre-flight commands moved from SKILL.md\n- [subscription-confirmation-and-delivery](references\u002Fsubscription-confirmation-and-delivery.md) — confirmation flows and delivery retry detail\n- [subscription-protocols-and-attributes](references\u002Fsubscription-protocols-and-attributes.md) — per-protocol endpoint formats and subscription attributes\n- [worked-examples](references\u002Fworked-examples.md) — diagnose, delivery-policy-with-DLQ, and cross-account BLOCKED worked examples moved from SKILL.md\n\n## Domain\n\nAWS CloudOps \u002F SNS Subscription Operations & App Integration.\n\n## AWS documentation\n\n- **Amazon SNS Developer Guide** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fsns\u002Flatest\u002Fdg\u002F\n- **SNS subscription operations** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fsns\u002Flatest\u002Fdg\u002Fsns-subscription-operations.html\n- **SNS filter policies** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fsns\u002Flatest\u002Fdg\u002Fsns-message-filtering.html\n- **SNS delivery policies** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fsns\u002Flatest\u002Fdg\u002Fsns-message-delivery-retries.html\n- **SNS dead-letter queues** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fsns\u002Flatest\u002Fdg\u002Fsns-dead-letter-queues.html\n- **SNS message data protection** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fsns\u002Flatest\u002Fdg\u002Fsns-data-protection.html\n- **SNS FIFO topics** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fsns\u002Flatest\u002Fdg\u002Ffifo-message-delivery.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,"keywords_tags":38,"verdict_shape":39,"lifecycle_status":40,"invocation_schema":41,"supports_pipeline":37,"activation_triggers":42},"aws, sns, app-integration, subscription, messaging, filter-policy, delivery-policy, operate","4","Jacky Chan — AWS Community Builder","aws-cloudops","AppIntegration","0.1.0","SNS, subscription, PendingConfirmation, ConfirmSubscription, filter policy, FilterPolicyScope, message attributes, delivery policy, retry backoff, dead-letter queue, DLQ, redrive policy, RawMessageDelivery, HTTP subscription, HTTPS subscription, SQS subscription, Lambda subscription, email subscription, firehose subscription, subscription attributes, SNS message data protection, cross-account subscription","operate","medium","false","capability","Creating an SNS subscription to a topic (HTTP\u002FHTTPS\u002FSQS\u002FLambda\u002F email\u002Fsms\u002Ffirehose\u002Fapplication), confirming a subscription stuck in PendingConfirmation, designing or debugging a subscription filter policy, configuring delivery retry policy and dead-letter queue (DLQ), setting subscription attributes (RawMessageDelivery), diagnosing why messages are not delivered to a subscription, or validating SNS message data protection posture for a subscription.","true","aws, sns, app-integration, subscription, messaging, operate","READY | BLOCKED | COMPLETED","active","Input: either (a) an SNS subscription configuration (topic ARN, protocol, endpoint, filter policy, delivery policy, subscription attributes) plus the intended operation (create, confirm, set-filter-policy, set-delivery-policy, set-attributes, delete, diagnose), OR (b) a subscription ARN + operation for live-account execution. Output: deterministic OPERATION \u002F VERDICT \u002F TARGET \u002F PRE_CHECKS \u002F STEPS \u002F POST_VERIFY \u002F NOTES block per operation, where VERDICT is one of READY, BLOCKED, COMPLETED.","create SNS subscription, confirm SNS subscription, PendingConfirmation, SNS filter policy, SNS delivery policy, SNS dead-letter queue, SNS subscription redrive, SNS retry backoff, RawMessageDelivery, subscribe to SNS topic, SNS subscription not receiving messages, SNS message data protection, cross-account SNS subscription, SNS firehose subscription, get-subscription-attributes","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 sns subscribe, confirm-subscription, list-subscriptions-by-topic, get-subscription-attributes, set-subscription-attributes, unsubscribe, aws sqs get-queue-attributes \u002F set-queue-attributes (for SQS-backed subscriptions and DLQ), aws lambda get-policy (for Lambda-backed subscriptions), aws firehose describe-delivery-stream (for...","main","eeace51bd5dd1db2030729d83eeab988861553aa","skills\u002Fsns-subscription-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 sns-subscription-operator",{"tool":58,"command":59},"bunx","bunx skills add jhkchan\u002Faws-agent-skills --skill sns-subscription-operator",{"tool":61,"command":62},"pnpm","pnpm dlx skills add jhkchan\u002Faws-agent-skills --skill sns-subscription-operator","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsns-subscription-operator\u002FSKILL.md",true,[66,72,76,80,84,88,92,96,100,104,108,112,116,120,124,128,132,136,140,144],{"path":67,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":70,"sourceHtmlUrl":71},"eval\u002Ftest-cases.yaml","REFERENCE","参考文档",7988,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsns-subscription-operator\u002Feval\u002Ftest-cases.yaml",{"path":73,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":74,"sourceHtmlUrl":75},"evals\u002Fbaselines\u002Fcreate-sqs-subscription-ready.md",886,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsns-subscription-operator\u002Fevals\u002Fbaselines\u002Fcreate-sqs-subscription-ready.md",{"path":77,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":78,"sourceHtmlUrl":79},"evals\u002Fbaselines\u002Fcross-account-subscription-blocked.md",609,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsns-subscription-operator\u002Fevals\u002Fbaselines\u002Fcross-account-subscription-blocked.md",{"path":81,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":82,"sourceHtmlUrl":83},"evals\u002Fbaselines\u002Fdelivery-policy-dlq-setup.md",855,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsns-subscription-operator\u002Fevals\u002Fbaselines\u002Fdelivery-policy-dlq-setup.md",{"path":85,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":86,"sourceHtmlUrl":87},"evals\u002Fbaselines\u002Ffilter-policy-attribute-mismatch.md",869,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsns-subscription-operator\u002Fevals\u002Fbaselines\u002Ffilter-policy-attribute-mismatch.md",{"path":89,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":90,"sourceHtmlUrl":91},"evals\u002Fbaselines\u002Fhttp-subscription-pending-confirmation.md",561,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsns-subscription-operator\u002Fevals\u002Fbaselines\u002Fhttp-subscription-pending-confirmation.md",{"path":93,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":94,"sourceHtmlUrl":95},"evals\u002Feval_config.yaml",1939,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsns-subscription-operator\u002Fevals\u002Feval_config.yaml",{"path":97,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":98,"sourceHtmlUrl":99},"evals\u002Fevals.json",4517,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsns-subscription-operator\u002Fevals\u002Fevals.json",{"path":101,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":102,"sourceHtmlUrl":103},"evals\u002Fprompts\u002Fcreate-sqs-subscription-ready.md",963,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsns-subscription-operator\u002Fevals\u002Fprompts\u002Fcreate-sqs-subscription-ready.md",{"path":105,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":106,"sourceHtmlUrl":107},"evals\u002Fprompts\u002Fcross-account-subscription-blocked.md",759,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsns-subscription-operator\u002Fevals\u002Fprompts\u002Fcross-account-subscription-blocked.md",{"path":109,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":110,"sourceHtmlUrl":111},"evals\u002Fprompts\u002Fdelivery-policy-dlq-setup.md",951,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsns-subscription-operator\u002Fevals\u002Fprompts\u002Fdelivery-policy-dlq-setup.md",{"path":113,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":114,"sourceHtmlUrl":115},"evals\u002Fprompts\u002Ffilter-policy-attribute-mismatch.md",985,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsns-subscription-operator\u002Fevals\u002Fprompts\u002Ffilter-policy-attribute-mismatch.md",{"path":117,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":118,"sourceHtmlUrl":119},"evals\u002Fprompts\u002Fhttp-subscription-pending-confirmation.md",714,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsns-subscription-operator\u002Fevals\u002Fprompts\u002Fhttp-subscription-pending-confirmation.md",{"path":121,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":122,"sourceHtmlUrl":123},"examples\u002FREADME.md",5893,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsns-subscription-operator\u002Fexamples\u002FREADME.md",{"path":125,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":126,"sourceHtmlUrl":127},"references\u002Fadvanced-patterns.md",9985,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsns-subscription-operator\u002Freferences\u002Fadvanced-patterns.md",{"path":129,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":130,"sourceHtmlUrl":131},"references\u002Fdiagnostic-commands.md",1452,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsns-subscription-operator\u002Freferences\u002Fdiagnostic-commands.md",{"path":133,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":134,"sourceHtmlUrl":135},"references\u002Fsubscription-confirmation-and-delivery.md",6127,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsns-subscription-operator\u002Freferences\u002Fsubscription-confirmation-and-delivery.md",{"path":137,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":138,"sourceHtmlUrl":139},"references\u002Fsubscription-protocols-and-attributes.md",4623,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsns-subscription-operator\u002Freferences\u002Fsubscription-protocols-and-attributes.md",{"path":141,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":142,"sourceHtmlUrl":143},"references\u002Fworked-examples.md",5448,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsns-subscription-operator\u002Freferences\u002Fworked-examples.md",{"path":145,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":146,"sourceHtmlUrl":147},"skill.usf.yaml",4648,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsns-subscription-operator\u002Fskill.usf.yaml",[149,156,163,170,177,184],{"skillNo":150,"name":151,"nameZh":6,"description":152,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":153,"categories":154,"keywords":155,"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":157,"name":158,"nameZh":6,"description":159,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":160,"categories":161,"keywords":162,"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":164,"name":165,"nameZh":6,"description":166,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":167,"categories":168,"keywords":169,"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":171,"name":172,"nameZh":6,"description":173,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":174,"categories":175,"keywords":176,"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":178,"name":179,"nameZh":6,"description":180,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":181,"categories":182,"keywords":183,"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":185,"name":186,"nameZh":6,"description":187,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":188,"categories":189,"keywords":190,"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",[],[]]