[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7ACTF2QW4DWBV523FRWTNBW":3,"skill-same:01M7ACTF2QW4DWBV523FRWTNBW":145},{"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":45,"commitSha":46,"skillDirectory":47,"forksCount":48,"repositoryHtmlUrl":49,"repositoryHomepageUrl":6,"ownerHtmlUrl":50,"ownerBlogUrl":6,"ownerDescription":51,"updatedAt":52,"install":53,"resources":66},"01M7ACTF2QW4DWBV523FRWTNBW","sqs-throughput-optimizer",null,"Optimises AWS SQS queue throughput and cost across seven dimensions: queue type selection (Standard vs FIFO), polling strategy (long vs short to eliminate empty receives), batch size tuning (max 10 messages per batch API to cut request units 10x), visibility timeout right-sizing, message retention period cost impact, DLQ redrive policy tuning, and FIFO high-throughput mode (DeduplicationScope + ThroughputLimit). Reads CloudWatch metrics (ApproximateNumberOfMessagesVisible, ApproximateAgeOfOldestMessage, NumberOfEmptyReceives), evaluates per-queue API request spend, and projects monthly savings. Emits OPTIMIZED or FURTHER_OPTIMIZATION_AVAILABLE with a queue-specific recommendation and estimated savings.","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\u002Fsqs-throughput-optimizer\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: sqs-throughput-optimizer\ndescription: 'Optimises AWS SQS queue throughput and cost across seven dimensions: queue type selection (Standard vs FIFO), polling strategy (long vs short to eliminate empty receives), batch size tuning (max 10 messages per batch API to cut request units 10x), visibility timeout right-sizing, message retention period cost impact, DLQ redrive policy tuning, and FIFO high-throughput mode (DeduplicationScope + ThroughputLimit). Reads CloudWatch metrics (ApproximateNumberOfMessagesVisible, ApproximateAgeOfOldestMessage, NumberOfEmptyReceives), evaluates per-queue API request spend, and projects monthly savings. Emits OPTIMIZED or FURTHER_OPTIMIZATION_AVAILABLE with a queue-specific recommendation and estimated savings.'\nlicense: Apache-2.0\ncompatibility: Agent runtime that reads SKILL.md (Claude Code, Cursor, Windsurf, Codex, Gemini). Offline recommendation classification works from pasted CloudWatch metrics. Live-account optimization uses aws sqs list-queues, aws sqs get-queue-attributes, aws sqs get-queue-url, aws cloudwatch get-metric-statistics (ApproximateNumberOfMessagesVisible, ApproximateAgeOfOldestMessage, NumberOfEmptyReceives, NumberOfMessagesSent, NumberOfMessagesReceived, NumberOfMessagesDeleted), aws ce get-cost-and-usage (AWS...\nmetadata:\n  domain: aws-cloudops\n  complexity: medium\n  requires_llm: 'true'\n  phase: '3'\n  supports_pipeline: 'true'\n  entry_point: 'false'\n  family: AppIntegration\n  task_type: optimize\n  skill_class: capability\n  lifecycle_status: active\n  verdict_shape: OPTIMIZED | FURTHER_OPTIMIZATION_AVAILABLE\n  when_to_use: Optimising SQS queue throughput, reducing empty receives via long polling, tuning batch size on consumers, right-sizing visibility timeout, reducing DLQ backlog via redrive policy adjustments, enabling FIFO high-throughput mode, or reviewing per-queue SQS API request spend.\n  when_not_to_use: SNS topic cost (use sns-topic-optimizer), EventBridge bus cost (use eventbridge-bus-optimizer), Kinesis Data Streams throughput (use kinesis-stream-optimizer), or functional SQS troubleshooting (message not arriving, permission denied — use the SQS troubleshooter). This skill focuses on throughput and cost-driven optimization decisions, not functional debugging of broken queues.\n  activation_triggers: optimise SQS throughput, SQS cost optimization, SQS long polling, SQS batch size, SQS empty receives, SQS visibility timeout, SQS DLQ redrive, SQS FIFO high throughput, SQS message retention cost, SQS SSE-KMS cost, SQS FinOps savings, SQS request units, reduce SQS bill, queue throughput review\n  invocation_schema: 'Input: either (a) a queue URL + live-account context, (b) a pasted set of CloudWatch SQS metrics with at least 14 days of observation, OR (c) a queue configuration document (queue type, attributes, redrive policy, consumer batch settings). Output: a deterministic TARGET\u002FVERDICT\u002FREASON\u002FRECOMMENDATION\u002FESTIMATED_SAVINGS\u002FMIGRATION_STEPS block per queue, where VERDICT is one of OPTIMIZED, FURTHER_OPTIMIZATION_AVAILABLE.'\n  invocation_example: \"# Minimal valid input (offline metric classification): QueueName: order-events-queue QueueType: Standard Region: us-east-1 Attributes:\\n  ReceiveMessageWaitTimeSeconds: 0\\n  VisibilityTimeout: 30\\n  MessageRetentionPeriod: 345600 (4 days)\\n  DelaySeconds: 0\\n  RedrivePolicy: {\\\"deadLetterTargetArn\\\":\\\"arn:...\\\",\\\"maxReceiveCount\\\":\\\"3\\\"}\\nConsumer config:\\n  Lambda ESM BatchSize: 1\\n  MaximumBatchingWindowInSeconds: 0\\nMetrics (last 30 days):\\n  - NumberOfEmptyReceives: 85,000,000\u002Fmonth\\n  - NumberOfMessagesReceived: 15,000,000\u002Fmonth\\n  - ApproximateNumberOfMessagesVisible: 2,000 avg\\n  - ApproximateAgeOfOldestMessage: 45 seconds avg\\nEmit the standard optimization block (TARGET, VERDICT, REASON, RECOMMENDATION, ESTIMATED_SAVINGS, MIGRATION_STEPS).\"\n  version: 0.1.0\n  author: Jacky Chan — AWS Community Builder\n  keywords: SQS, throughput optimization, cost optimization, FIFO, Standard queue, long polling, short polling, batch size, visibility timeout, message retention, DLQ, dead-letter queue, redrive policy, high-throughput mode, DeduplicationScope, ThroughputLimit, MessageGroupId, SSE-KMS, cross-region messaging, FinOps, AppIntegration\n  tags: sqs, messaging, app-integration, cost-optimization, finops, throughput\n---\n\n\n# SQS Throughput Optimizer\n\n## What this skill does\n\n→ Moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — skill scope and the seven optimization dimensions.\n\n## Quick navigation\n\n| Section | What it covers | When to jump here |\n|---|---|---|\n| Quick start | Five headline rules and the cost formula | First read |\n| Mindset | Why empty receives are the #1 cost drain | Understanding the approach |\n| Quick reference — verdict thresholds | Decision matrix at a glance | Classifying a queue |\n| Pre-flight data gate | CloudWatch metrics, queue attributes | Before any recommendation |\n| Step 0 non-obvious behaviours | Batch API limits, FIFO partitioning, KMS | Edge cases |\n| Step 1 Polling strategy | Long polling vs short polling | The headline savings dimension |\n| Step 2 Batch size tuning | Batch APIs reduce request units 10x | High-volume consumers |\n| Step 3 Visibility timeout | Right-size to consumer processing time | Stuck\u002Fre-delivered messages |\n| Step 4 Message retention | Storage cost vs data loss risk | Long retention queues |\n| Step 5 DLQ redrive tuning | maxReceiveCount, redrive volume | Backlogged DLQs |\n| Step 6 Queue type \u002F FIFO mode | FIFO high-throughput, Standard vs FIFO | FIFO queues at the throughput ceiling |\n| Step 7 Impact estimation | The cost formula and worked math | Every recommendation |\n| Output format | VERDICT block + worked examples | Emitting the result |\n| Anti-Patterns — NEVER | Common misclassifications | Self-check before emit |\n| Pre-flight safety checks | CONFIRM gate, attribute verification | Before any apply CLI |\n\n## Quick start\n\n→ Moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — five headline rules and the cost formula.\n\n## Mindset\n\n→ Moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — the request-volume mindset and its four principles.\n\n## Quick reference — verdict thresholds\n\n| Observation (14-30 day window) | Verdict | Recommendation |\n|---|---|---|\n| `NumberOfEmptyReceives` > 50% of total `ReceiveMessage` calls AND `ReceiveMessageWaitTimeSeconds = 0` | **FURTHER_OPTIMIZATION_AVAILABLE** (polling) | Step 1 — enable long polling (WaitTimeSeconds 1-20) |\n| Consumer uses single-message APIs (batch size 1 or no batch delete) AND message volume > 1M\u002Fmonth | **FURTHER_OPTIMIZATION_AVAILABLE** (batching) | Step 2 — switch to batch APIs, batch size 10 |\n| `VisibilityTimeout` \u003C observed consumer processing p95 AND re-delivery rate > 5% | **FURTHER_OPTIMIZATION_AVAILABLE** (visibility) | Step 3 — increase VisibilityTimeout to 6× processing p95 |\n| `MessageRetentionPeriod` > 7 days AND `ApproximateNumberOfMessagesVisible` \u003C 100 sustained | **FURTHER_OPTIMIZATION_AVAILABLE** (retention) | Step 4 — reduce retention period (saves storage cost if high-volume) |\n| DLQ `ApproximateNumberOfMessagesVisible` > 1000 sustained AND no redrive configured | **FURTHER_OPTIMIZATION_AVAILABLE** (redrive) | Step 5 — tune maxReceiveCount or start redrive |\n| FIFO queue at 300 TX\u002Fs ceiling AND `ThroughputLimit` not set to `PerMessageGroupId` | **FURTHER_OPTIMIZATION_AVAILABLE** (FIFO mode) | Step 6 — enable high-throughput FIFO mode |\n| Standard queue for workload needing ordering AND at throughput ceiling | **FURTHER_OPTIMIZATION_AVAILABLE** (queue type) | Step 6 — evaluate FIFO high-throughput migration |\n| SSE-KMS enabled AND queue throughput \u003C 100 msg\u002Fs | Evaluate KMS cost vs business requirement; KMS may be overkill | Note KMS cost overhead, do not auto-recommend removal |\n| All dimensions verified AND no further savings-bearing action | **OPTIMIZED** | Continue monitoring |\n| Metrics absent or window \u003C 14 days | **NEED_MORE_INFO** | Pull 14-30 day CloudWatch data, re-evaluate |\n\n## Pre-flight: data gate (run before any optimization decision)\n\nOptimization decisions are only as good as the underlying data. Pull\nthese metrics before any recommendation. Full CLI sequences are in\n`references\u002Fsqs-pricing-and-batch-reference.md`.\n\n**Required data sources** (summarized — see reference for full CLI):\n1. Queue attributes: `aws sqs get-queue-attributes`\n2. Throughput metrics (14-30 day window): `aws cloudwatch get-metric-statistics`\n3. Consumer configuration (Lambda ESM): `aws lambda list-event-source-mappings`\n4. Redrive policy: parse from queue attributes JSON\n5. DLQ depth (if redrive configured): `aws sqs get-queue-attributes` on DLQ ARN\n6. Cost data: `aws ce get-cost-and-usage` filtered by Service=SQS\n\n### Data-quality short-circuits\n\n→ Moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — data-quality short-circuit table (6 conditions).\n\n## Process — Optimization logic (apply in order)\n\n### Step 0: Non-obvious behaviours that change the recommendation\n\n→ Moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — Step 0 expert-knowledge deep dive: 10 non-obvious behaviours that change the recommendation.\n\n### Step 1: Polling strategy (the #1 lever)\n\nEmpty receives are the single largest source of wasted SQS spend. Each\nempty `ReceiveMessage` call costs the same as a full one.\n\n→ Worked math moved to [references\u002Fworked-examples.md](references\u002Fworked-examples.md) — empty-receive ratio and monthly wasted cost.\n\n**Decision gate:**\n\n| ReceiveMessageWaitTimeSeconds | Empty receive ratio | Verdict | Action |\n|---|---|---|---|\n| 0 (short polling) | > 50% | **FURTHER_OPTIMIZATION_AVAILABLE** | Set WaitTimeSeconds to 20 (or 1-5 for latency-sensitive) |\n| 0 (short polling) | \u003C 10% | No finding | Queue is dense; short polling is acceptable |\n| >= 1 (long polling) | > 50% | Investigate consumer concurrency | Consumer may be over-provisioned; reduce poller count |\n| >= 1 (long polling) | \u003C 10% | No finding | Optimal |\n\n```bash\naws sqs set-queue-attributes \\\n  --queue-url https:\u002F\u002Fsqs.us-east-1.amazonaws.com\u002F\u003Cacct>\u002F\u003Cqueue> \\\n  --attributes ReceiveMessageWaitTimeSeconds=20\n```\n\n→ Lambda ESM polling note moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — ESM always uses long polling internally.\n\n### Step 2: Batch size tuning (request unit reduction)\n\nBatch APIs reduce request count by up to 10x. SQS offers three batch\nAPIs: `SendMessageBatch`, `DeleteMessageBatch`,\n`ChangeMessageVisibilityBatch`, each handling up to 10 messages per call.\n\n→ Worked math moved to [references\u002Fworked-examples.md](references\u002Fworked-examples.md) — 10x request-unit reduction math.\n\n**Decision gate:**\n\n| Consumer pattern | Message volume | Verdict | Action |\n|---|---|---|---|\n| Producer uses `SendMessage` one-at-a-time | > 1M msgs\u002Fmonth | **FURTHER_OPTIMIZATION_AVAILABLE** | Switch to `SendMessageBatch` |\n| Consumer uses `DeleteMessage` one-at-a-time | > 1M msgs\u002Fmonth | **FURTHER_OPTIMIZATION_AVAILABLE** | Switch to `DeleteMessageBatch` |\n| Lambda ESM BatchSize = 1 | Any | **FURTHER_OPTIMIZATION_AVAILABLE** | Increase ESM BatchSize to 10 |\n| All batch APIs in use | Any | No finding | Optimal |\n\n→ Lambda ESM batch tuning CLI and notes moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\n\n### Step 3: Visibility timeout right-sizing\n\nVisibility timeout controls how long a message stays invisible after being\nreceived. If it is shorter than the consumer's processing time, the\nmessage becomes visible again and gets re-delivered — inflating both\nReceiveMessage and DeleteMessage counts.\n\n→ Worked math moved to [references\u002Fworked-examples.md](references\u002Fworked-examples.md) — re-delivery cost inflation formula.\n\n**Decision gate:**\n\n| VisibilityTimeout | Consumer processing p95 | Re-delivery rate | Verdict |\n|---|---|---|---|\n| \u003C processing p95 | measured | > 5% | **FURTHER_OPTIMIZATION_AVAILABLE** |\n| >= 6 × processing p95 | measured | \u003C 1% | No finding (optimal) |\n| 30s (default) | unknown | unknown | NEED_MORE_INFO — measure processing p95 |\n\n**Rule of thumb:** Set `VisibilityTimeout` to 6× the consumer's p95\nprocessing time. Covers retries and restarts.\n\n```bash\naws sqs set-queue-attributes \\\n  --queue-url \u003Curl> \\\n  --attributes VisibilityTimeout=120\n```\n\n→ Lambda ESM visibility note moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — ESM VisibilityTimeout overrides the queue default.\n\n### Step 4: Message retention period cost impact\n\nMessage retention controls how long SQS stores undelivered messages.\nDefault is 4 days (345,600 seconds); maximum is 14 days (1,209,600\nseconds). Retention affects storage cost, not request cost.\n\n→ Storage pricing note moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\n\n**Decision gate:**\n\n| MessageRetentionPeriod | Queue depth (visible msgs) | Verdict | Action |\n|---|---|---|---|\n| 14 days (max) AND queue depth \u003C 100 sustained | Low | **FURTHER_OPTIMIZATION_AVAILABLE** | Reduce to 4 days (limits blast radius of consumer outage) |\n| 4 days (default) AND queue depth stable | Healthy | No finding | Optimal |\n| \u003C 4 days AND messages expiring before processing | High | Investigate consumer capacity | Consumer is the bottleneck, not retention |\n\n### Step 5: DLQ redrive policy tuning\n\nDLQs capture messages that exceed `maxReceiveCount`. A backlogged DLQ\nindicates either consumer failures (poison pill messages) or\nmisconfigured maxReceiveCount (too low, causing premature DLQ routing).\n\n**DLQ health signals:**\n\n| DLQ metric | Healthy | Unhealthy |\n|---|---|---|\n| `ApproximateNumberOfMessagesVisible` | \u003C 100 | > 1,000 sustained |\n| `ApproximateAgeOfOldestMessage` | \u003C 1 hour | > 24 hours |\n| Messages flowing in (via redrive from main) | Sporadic | Continuous stream |\n\n**Decision gate:**\n\n| DLQ observation | Verdict | Action |\n|---|---|---|\n| DLQ depth > 1,000 sustained AND no redrive started | **FURTHER_OPTIMIZATION_AVAILABLE** | Start redrive via `StartMessageMoveTask` |\n| `maxReceiveCount` \u003C 3 AND DLQ depth growing | **FURTHER_OPTIMIZATION_AVAILABLE** | Increase maxReceiveCount to 5 (if consumer is transiently failing) |\n| `maxReceiveCount` > 10 AND poison-pill messages | **FURTHER_OPTIMIZATION_AVAILABLE** | Decrease maxReceiveCount; investigate consumer error handling |\n| DLQ depth \u003C 100 AND maxReceiveCount = 3-5 | No finding | Healthy |\n\n**Redrive (v2 API — batch, cost-efficient):**\n```bash\naws sqs start-message-move-task \\\n  --source-arn arn:aws:sqs:us-east-1:\u003Cacct>:\u003Cqueue-dlq> \\\n  --destination-arn arn:aws:sqs:us-east-1:\u003Cacct>:\u003Cqueue>\n```\n\nNever use the legacy per-message redrive pattern (Lambda polling DLQ and\nre-sending). The v2 API is batch-based and 10x cheaper.\n\n### Step 6: Queue type selection and FIFO high-throughput mode\n\n**Standard vs FIFO:**\n\n| Dimension | Standard | FIFO |\n|---|---|---|\n| Throughput | Nearly unlimited (API limits apply) | 300 TX\u002Fs per MessageGroupId default; 9000 TX\u002Fs batch in high-throughput mode |\n| Ordering | Best-effort | Per MessageGroupId |\n| Deduplication | None | Content-based or explicit `MessageDeduplicationId` |\n| Cost per request | Same ($0.40\u002FM) | Same ($0.40\u002FM) |\n| At-least-once | Yes | Yes (with dedup approximation to exactly-once) |\n\n**FIFO high-throughput mode decision:**\n\n| FIFO queue observation | Verdict | Action |\n|---|---|---|\n| `ThroughputLimit` absent (default queue-level 300 TX\u002Fs) AND per-MessageGroupId throughput > 300 | **FURTHER_OPTIMIZATION_AVAILABLE** | Enable `ThroughputLimit=PerMessageGroupId` + `DeduplicationScope=MessageGroup` |\n| Already in high-throughput mode | No finding | Optimal |\n| Workload needs cross-group ordering | N\u002FA | High-throughput mode breaks cross-group dedup; do not recommend |\n\n```bash\naws sqs set-queue-attributes \\\n  --queue-url \u003Cfifo-url> \\\n  --attributes DeduplicationScope=MessageGroup,ThroughputLimit=PerMessageGroupId\n```\n\n**Do NOT recommend Standard→FIFO migration purely for \"throughput\noptimization.\"** FIFO is for ordering guarantees. Standard queues already\nhave higher throughput. Only recommend FIFO→high-throughput mode (Step 6).\n\n### Step 7: Impact estimation\n\nCompute the monthly savings for each recommendation:\n\n→ Impact-estimation formulas moved to [references\u002Fworked-examples.md](references\u002Fworked-examples.md); the assumptions list below stays.\n\nAlways state assumptions: monthly request count breakdown (Send\u002FReceive\u002F\nDelete), empty receive ratio, re-delivery rate, pricing region, KMS\nstatus, FIFO mode.\n\n### Step 8: Final verdict\n\n- Any dimension recommends a change → **FURTHER_OPTIMIZATION_AVAILABLE**.\n- All dimensions pass AND queue is optimally configured → **OPTIMIZED**.\n- Change applied and verified this session → **OPTIMIZED** (with post-\n  state verification note).\n- Data insufficient (metrics absent, window \u003C 14 days) →\n  **NEED_MORE_INFO**.\n\nNever emit `FURTHER_OPTIMIZATION_AVAILABLE` without first discharging\nevery `NEED_MORE_INFO` \u002F `BLOCKED` gate.\n\n## Output format\n\n→ Template moved to [references\u002Fworked-examples.md](references\u002Fworked-examples.md); the authoritative copy is \"Required output structure\" in the STRICT output contract below.\n\nFull worked examples (long polling enablement, batch migration, FIFO\nhigh-throughput enablement, already-optimal, NEED_MORE_INFO, end-to-end\nwalkthrough) are in `references\u002Fworked-examples.md`.\n\n### Worked example — Standard queue optimized to long-polling + batch (before\u002Fafter table)\n\n→ Secondary worked example moved to [references\u002Fworked-examples.md](references\u002Fworked-examples.md) — Standard queue long-polling + batch before\u002Fafter.\n\n## STRICT output contract\n\nThe rules below are hard constraints. Violating any one produces a\nmisclassification or an arithmetic contradiction that breaks downstream\nFinOps automation. Self-check EVERY emitted block against these rules\nbefore returning the response.\n\n### Decision tree leading to the output\n\n```text\n1. Is there ≥14 days of CloudWatch data AND queue attributes?\n   ├─ NO  → VERDICT: NEED_MORE_INFO (data gate failed)\n   └─ YES → go to 2\n2. NumberOfEmptyReceives > 50% of total AND WaitTimeSeconds = 0?\n   ├─ YES → flag polling (Step 1); propose WaitTimeSeconds=20\n   └─ NO  → polling ✓\n3. Consumer uses single-message APIs (batch size 1 \u002F no batch delete)\n   AND volume > 1M msgs\u002Fmonth?\n   ├─ YES → flag batching (Step 2); propose batch APIs (size 10)\n   └─ NO  → batching ✓\n4. VisibilityTimeout \u003C consumer p95 AND re-delivery rate > 5%?\n   ├─ YES → flag visibility (Step 3); propose 6× processing p95\n   └─ NO  → visibility ✓\n5. MessageRetentionPeriod > 7 days AND queue depth \u003C 100 sustained?\n   ├─ YES → flag retention (Step 4)\n   └─ NO  → retention ✓\n6. DLQ depth > 1000 sustained OR no redrive configured?\n   ├─ YES → flag redrive (Step 5); propose StartMessageMoveTask\n   └─ NO  → redrive ✓\n7. FIFO queue at 300 TX\u002Fs AND ThroughputLimit not PerMessageGroupId?\n   ├─ YES → flag FIFO mode (Step 6)\n   └─ NO  → fifo-mode ✓ (or N\u002FA for Standard)\n8. Any flag set?\n   ├─ YES → VERDICT: FURTHER_OPTIMIZATION_AVAILABLE\n   │        compute savings, emit all 7 dimensions in \"Dimensions checked\"\n   └─ NO  → VERDICT: OPTIMIZED\n```\n\n### Required output structure\n\nEvery response MUST be a single block using these literal labels, in this\norder. Do NOT substitute markdown headings, camelCase, or bold variants.\n\n```text\nTARGET: \u003Cqueue-name>\nVERDICT: OPTIMIZED | FURTHER_OPTIMIZATION_AVAILABLE\nREASON: \u003C1-2 sentences naming the recommendation and the supporting data>\nRECOMMENDATION:\n  Current: \u003Cpolling>, \u003Cbatch>, \u003Cvisibility>, \u003Cqueue type\u002Fmode>\n  Proposed: \u003Cpolling>, \u003Cbatch>, \u003Cvisibility>, \u003Cqueue type\u002Fmode>\n  Dimensions changed: \u003Cpolling | batching | visibility | retention | redrive | queue-type>\n  Dimensions checked: \u003Clist ALL seven, each ✓ (no finding) or → (finding)>\n  Confidence: \u003CHIGH\u002FMEDIUM\u002FLOW> — \u003Cone-line rationale>\nESTIMATED_SAVINGS:\n  Current monthly: $\u003Camount>    ← MUST show request breakdown subtotals\n  Projected monthly: $\u003Camount>\n  Monthly saving: $\u003Camount>     ← MUST equal Current − Projected, 2 decimals\n  Annual saving: $\u003Camount>      ← MUST equal Monthly × 12\nMIGRATION_STEPS:\n  1. \u003Cspecific action with CLI command>\n  2. \u003Cverification step>\nCONFIRM: \u003Cconfirmation prompt text>\n```\n\n### FORBIDDEN output patterns\n\n1. **NEVER emit `VERDICT: FURTHER_OPTIMIZATION_AVAILABLE` with\n   `Monthly saving: $0.00`.** If every dimension nets zero cost delta,\n   the verdict MUST be `OPTIMIZED`.\n\n2. **NEVER show savings math that does not balance.**\n   `Current monthly − Projected monthly` MUST equal `Monthly saving`,\n   rounded to 2 decimal places.\n\n3. **NEVER emit scratch lines** (\"WAIT — recompute\", \"Hmm, let me redo\",\n   \"corrected:\") in the output. Finalize the math before emitting.\n\n4. **NEVER recommend long polling without citing the empty-receive\n   ratio.** The REASON MUST name the NumberOfEmptyReceives metric.\n\n5. **NEVER omit a dimension from the RECOMMENDATION block.** The\n   `Dimensions checked` line MUST list all seven dimensions, each marked\n   ✓ (no finding) or → (finding).\n\n6. **NEVER recommend Standard→FIFO migration as a \"throughput\n   optimization.\"** FIFO is for ordering, not throughput. Standard queues\n   have higher throughput. Reverse migrations break ordering guarantees.\n\n7. **NEVER round intermediate formula steps differently from the final\n   figure.** Compute at full precision, round only the displayed result.\n\n### Perfect example output — FURTHER_OPTIMIZATION_AVAILABLE with verified math\n\nEvery field below is internally consistent. Copy this shape exactly.\n\n```text\nTARGET: order-events-queue\nVERDICT: FURTHER_OPTIMIZATION_AVAILABLE\nREASON: Standard queue with ReceiveMessageWaitTimeSeconds=0 generating\n  85M empty receives\u002Fmonth (85% of total ReceiveMessage calls). Enabling\n  long polling (WaitTimeSeconds=20) projects a 90% reduction in empty\n  receives. Consumer also uses DeleteMessage one-at-a-time; switching to\n  DeleteMessageBatch reduces delete requests 10x.\nRECOMMENDATION:\n  Current: short polling (WaitTimeSeconds=0), single-message delete, VisibilityTimeout=30s, Standard\n  Proposed: long polling (WaitTimeSeconds=20), batch delete, VisibilityTimeout=30s, Standard\n  Dimensions changed: polling (Step 1) + batching (Step 2)\n  Dimensions checked: polling → (enable long)  batching → (batch delete)\n    visibility ✓ (30s > consumer p95 200ms)  retention ✓ (4 days, healthy)\n    redrive ✓ (maxReceiveCount=3, DLQ depth \u003C 50)  queue-type ✓ (Standard, no ordering needed)\n    fifo-mode ✓ (N\u002FA — Standard queue)\n  Confidence: HIGH — CloudWatch NumberOfEmptyReceives directly measured;\n    batch delete is a code-level change with no infrastructure risk.\nESTIMATED_SAVINGS:\n  Current monthly: $68.00\n    requests: (100M total) \u002F 1M × $0.40 = $40.00\n    empty receives: (85M empty) \u002F 1M × $0.40 = $34.00\n    Note: empty receives are counted in the 100M total above; subtotal\n    shown for attribution. Effective unique-request cost: $40.00.\n  Projected monthly: $10.60\n    requests: (26M projected total) \u002F 1M × $0.40 = $10.40\n      (15M receive + 8.5M empty @ 90% reduction + 1.5M batch delete + 1M send)\n    KMS: not applicable (SSE-SQS)\n  Monthly saving: $29.40\n    ($40.00 − $10.60 = $29.40 ✓)\n  Annual saving: $352.80\nMIGRATION_STEPS:\n  1. Enable long polling on the queue:\n     aws sqs set-queue-attributes --queue-url \u003Curl> --attributes ReceiveMessageWaitTimeSeconds=20\n  2. Update consumer to use DeleteMessageBatch instead of DeleteMessage:\n     aws sqs delete-message-batch --queue-url \u003Curl> --entries file:\u002F\u002Fbatch.json\n  3. Monitor NumberOfEmptyReceives for 7 days post-change:\n     aws cloudwatch get-metric-statistics --namespace AWS\u002FSQS --metric-name NumberOfEmptyReceives ...\n  4. Verify ApproximateAgeOfOldestMessage stays under 60s (no backlog).\nCONFIRM: About to set-queue-attributes on order-events-queue\n  (WaitTimeSeconds 0 → 20) and switch consumer to batch delete. Monthly\n  saving $29.40 (73% request reduction). Proceed? (yes\u002Fno)\n```\n\n**Self-check before emit:**\n- [ ] `Current monthly − Projected monthly == Monthly saving` (2 decimals)?\n- [ ] `Monthly saving × 12 == Annual saving`?\n- [ ] All seven dimensions listed in `Dimensions checked`?\n- [ ] Every `→` dimension has a corresponding MIGRATION_STEPS entry?\n- [ ] No scratch\u002Frecompute text in the block?\n\n## Verdict semantics\n\n| Verdict | When to emit |\n|---|---|\n| `FURTHER_OPTIMIZATION_AVAILABLE` | At least one dimension has a concrete, savings-bearing recommendation. |\n| `OPTIMIZED` | All dimensions pass (long polling enabled, batch APIs in use, visibility timeout right-sized, retention healthy, DLQ healthy). |\n| `NEED_MORE_INFO` | Data gate failed: metrics absent or window \u003C 14 days. |\n| `BLOCKED` | Hard precondition prevents evaluation: queue deleted, redrive target missing, IAM denies sqs:GetQueueAttributes. |\n\n**Zero-savings rule:** If MONTHLY_SAVING == $0.00 for every dimension,\nverdict MUST be `OPTIMIZED`, never `FURTHER_OPTIMIZATION_AVAILABLE`.\nException: a throughput improvement without direct cost change (e.g.,\nFIFO high-throughput mode for a queue at the ceiling) is surfaced in\nREASON as a throughput delta, NOT as a dollar saving — but if the queue\nis NOT at the ceiling, the verdict is `OPTIMIZED`.\n\n## Configuration dependency graph\n\n→ Moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — full configuration dependency graph.\n\n## Anti-Patterns — NEVER (top 5)\n\n1. **NEVER recommend long polling without verifying the empty-receive\n   ratio.** If the queue is dense (empty receives \u003C 10%), long polling\n   adds latency without saving cost. Always cite NumberOfEmptyReceives.\n\n2. **NEVER recommend Standard→FIFO migration as a throughput\n   optimization.** FIFO is for ordering guarantees. Standard queues have\n   higher throughput. The only queue-type throughput optimization is\n   FIFO→high-throughput mode (Step 6).\n\n3. **NEVER increase Lambda ESM BatchSize without verifying the consumer\n   handles partial batch failures.** Ensure\n   `FunctionResponseTypes: [\"ReportBatchItemFailures\"]` is set on the ESM.\n\n4. **NEVER reduce MessageRetentionPeriod on a queue with active consumer\n   outages without warning the operator.** Reducing retention drops\n   in-flight messages permanently. Retention is a data-loss dial, not a\n   cost dial.\n\n5. **NEVER use the legacy per-message DLQ redrive pattern.** Always use\n   `StartMessageMoveTask` (the v2 batch API). The Lambda-polls-DLQ-and-\n   re-sends pattern is 10x more expensive and error-prone.\n\nExtended anti-patterns in `references\u002Fworked-examples.md`.\n\n## Pre-flight safety checks (run before any remediation CLI)\n\n→ Moved to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — CONFIRM gate and 8 safety checks.\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\n## References\n\n- `references\u002Fsqs-pricing-and-batch-reference.md` — pricing tables,\n  throughput limits by queue type, batch API payload limits, FIFO\n  high-throughput mode configuration, KMS cost math, regional pricing\n  multipliers, cost calculation worked examples.\n- `references\u002Fworked-examples.md` — full worked examples (long polling\n  enablement, batch migration, FIFO high-throughput enablement, already-\n  optimal, NEED_MORE_INFO, end-to-end walkthrough) plus error handling,\n  CLI failure recovery, FIFO cross-group dedup gotchas, and extended\n  NEVER list.\n\n## References (load on demand)\n\n- [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — What this skill does, Quick start, Mindset, data-quality short-circuits, Step 0 non-obvious behaviours, Lambda ESM notes, configuration dependency graph, recent AWS features.\n- [references\u002Fworked-examples.md](references\u002Fworked-examples.md) — pre-existing; extended with the step worked-math blocks, the Output format template, and the before\u002Fafter worked example moved from SKILL.md.\n- [references\u002Fsqs-pricing-and-batch-reference.md](references\u002Fsqs-pricing-and-batch-reference.md) — pre-existing; pricing tables, batch API payload limits, FIFO high-throughput config, KMS cost math.\n- [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — pre-flight safety checks and the CONFIRM gate to run before any remediation CLI.\n\n## Domain\n\nAWS CloudOps \u002F SQS Messaging Throughput & Cost Optimization, AppIntegration\nfamily.\n\n## AWS documentation\n\n- **Amazon SQS Developer Guide** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAWSSimpleQueueService\u002Flatest\u002FSQSDeveloperGuide\u002Fwelcome.html\n- **Amazon SQS pricing** — https:\u002F\u002Faws.amazon.com\u002Fsqs\u002Fpricing\u002F\n- **SQS quotas** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAWSSimpleQueueService\u002Flatest\u002FSQSDeveloperGuide\u002Fsqs-quotas.html\n- **SQS FIFO high-throughput mode** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAWSSimpleQueueService\u002Flatest\u002FSQSDeveloperGuide\u002Fhigh-throughput-fifo.html\n- **SQS visibility timeout** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAWSSimpleQueueService\u002Flatest\u002FSQSDeveloperGuide\u002Fsqs-visibility-timeout.html\n- **SQS message timers** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAWSSimpleQueueService\u002Flatest\u002FSQSDeveloperGuide\u002Fsqs-delay-queues.html\n- **SQS dead-letter queues** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAWSSimpleQueueService\u002Flatest\u002FSQSDeveloperGuide\u002Fsqs-dead-letter-queues.html\n- **SQS redrive (StartMessageMoveTask)** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAWSSimpleQueueService\u002Flatest\u002FSQSDeveloperGuide\u002Fsqs-configure-dead-letter-queue-redrive.html\n- **Lambda event source mappings (SQS)** — https:\u002F\u002Fdocs.aws.amazon.com\u002Flambda\u002Flatest\u002Fdg\u002Fwith-sqs.html\n- **AWS CLI SQS reference** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fcli\u002Flatest\u002Freference\u002Fsqs\u002F\n- **AWS Well-Architected Framework — Cost Optimization** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fwellarchitected\u002Flatest\u002Fcost-optimization-pillar\u002Fwelcome.html\n","# SQS Throughput Optimizer\n\n## What this skill does\n\n→ Moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — skill scope and the seven optimization dimensions.\n\n## Quick navigation\n\n| Section | What it covers | When to jump here |\n|---|---|---|\n| Quick start | Five headline rules and the cost formula | First read |\n| Mindset | Why empty receives are the #1 cost drain | Understanding the approach |\n| Quick reference — verdict thresholds | Decision matrix at a glance | Classifying a queue |\n| Pre-flight data gate | CloudWatch metrics, queue attributes | Before any recommendation |\n| Step 0 non-obvious behaviours | Batch API limits, FIFO partitioning, KMS | Edge cases |\n| Step 1 Polling strategy | Long polling vs short polling | The headline savings dimension |\n| Step 2 Batch size tuning | Batch APIs reduce request units 10x | High-volume consumers |\n| Step 3 Visibility timeout | Right-size to consumer processing time | Stuck\u002Fre-delivered messages |\n| Step 4 Message retention | Storage cost vs data loss risk | Long retention queues |\n| Step 5 DLQ redrive tuning | maxReceiveCount, redrive volume | Backlogged DLQs |\n| Step 6 Queue type \u002F FIFO mode | FIFO high-throughput, Standard vs FIFO | FIFO queues at the throughput ceiling |\n| Step 7 Impact estimation | The cost formula and worked math | Every recommendation |\n| Output format | VERDICT block + worked examples | Emitting the result |\n| Anti-Patterns — NEVER | Common misclassifications | Self-check before emit |\n| Pre-flight safety checks | CONFIRM gate, attribute verification | Before any apply CLI |\n\n## Quick start\n\n→ Moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — five headline rules and the cost formula.\n\n## Mindset\n\n→ Moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — the request-volume mindset and its four principles.\n\n## Quick reference — verdict thresholds\n\n| Observation (14-30 day window) | Verdict | Recommendation |\n|---|---|---|\n| `NumberOfEmptyReceives` > 50% of total `ReceiveMessage` calls AND `ReceiveMessageWaitTimeSeconds = 0` | **FURTHER_OPTIMIZATION_AVAILABLE** (polling) | Step 1 — enable long polling (WaitTimeSeconds 1-20) |\n| Consumer uses single-message APIs (batch size 1 or no batch delete) AND message volume > 1M\u002Fmonth | **FURTHER_OPTIMIZATION_AVAILABLE** (batching) | Step 2 — switch to batch APIs, batch size 10 |\n| `VisibilityTimeout` \u003C observed consumer processing p95 AND re-delivery rate > 5% | **FURTHER_OPTIMIZATION_AVAILABLE** (visibility) | Step 3 — increase VisibilityTimeout to 6× processing p95 |\n| `MessageRetentionPeriod` > 7 days AND `ApproximateNumberOfMessagesVisible` \u003C 100 sustained | **FURTHER_OPTIMIZATION_AVAILABLE** (retention) | Step 4 — reduce retention period (saves storage cost if high-volume) |\n| DLQ `ApproximateNumberOfMessagesVisible` > 1000 sustained AND no redrive configured | **FURTHER_OPTIMIZATION_AVAILABLE** (redrive) | Step 5 — tune maxReceiveCount or start redrive |\n| FIFO queue at 300 TX\u002Fs ceiling AND `ThroughputLimit` not set to `PerMessageGroupId` | **FURTHER_OPTIMIZATION_AVAILABLE** (FIFO mode) | Step 6 — enable high-throughput FIFO mode |\n| Standard queue for workload needing ordering AND at throughput ceiling | **FURTHER_OPTIMIZATION_AVAILABLE** (queue type) | Step 6 — evaluate FIFO high-throughput migration |\n| SSE-KMS enabled AND queue throughput \u003C 100 msg\u002Fs | Evaluate KMS cost vs business requirement; KMS may be overkill | Note KMS cost overhead, do not auto-recommend removal |\n| All dimensions verified AND no further savings-bearing action | **OPTIMIZED** | Continue monitoring |\n| Metrics absent or window \u003C 14 days | **NEED_MORE_INFO** | Pull 14-30 day CloudWatch data, re-evaluate |\n\n## Pre-flight: data gate (run before any optimization decision)\n\nOptimization decisions are only as good as the underlying data. Pull\nthese metrics before any recommendation. Full CLI sequences are in\n`references\u002Fsqs-pricing-and-batch-reference.md`.\n\n**Required data sources** (summarized — see reference for full CLI):\n1. Queue attributes: `aws sqs get-queue-attributes`\n2. Throughput metrics (14-30 day window): `aws cloudwatch get-metric-statistics`\n3. Consumer configuration (Lambda ESM): `aws lambda list-event-source-mappings`\n4. Redrive policy: parse from queue attributes JSON\n5. DLQ depth (if redrive configured): `aws sqs get-queue-attributes` on DLQ ARN\n6. Cost data: `aws ce get-cost-and-usage` filtered by Service=SQS\n\n### Data-quality short-circuits\n\n→ Moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — data-quality short-circuit table (6 conditions).\n\n## Process — Optimization logic (apply in order)\n\n### Step 0: Non-obvious behaviours that change the recommendation\n\n→ Moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — Step 0 expert-knowledge deep dive: 10 non-obvious behaviours that change the recommendation.\n\n### Step 1: Polling strategy (the #1 lever)\n\nEmpty receives are the single largest source of wasted SQS spend. Each\nempty `ReceiveMessage` call costs the same as a full one.\n\n→ Worked math moved to [references\u002Fworked-examples.md](references\u002Fworked-examples.md) — empty-receive ratio and monthly wasted cost.\n\n**Decision gate:**\n\n| ReceiveMessageWaitTimeSeconds | Empty receive ratio | Verdict | Action |\n|---|---|---|---|\n| 0 (short polling) | > 50% | **FURTHER_OPTIMIZATION_AVAILABLE** | Set WaitTimeSeconds to 20 (or 1-5 for latency-sensitive) |\n| 0 (short polling) | \u003C 10% | No finding | Queue is dense; short polling is acceptable |\n| >= 1 (long polling) | > 50% | Investigate consumer concurrency | Consumer may be over-provisioned; reduce poller count |\n| >= 1 (long polling) | \u003C 10% | No finding | Optimal |\n\n```bash\naws sqs set-queue-attributes \\\n  --queue-url https:\u002F\u002Fsqs.us-east-1.amazonaws.com\u002F\u003Cacct>\u002F\u003Cqueue> \\\n  --attributes ReceiveMessageWaitTimeSeconds=20\n```\n\n→ Lambda ESM polling note moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — ESM always uses long polling internally.\n\n### Step 2: Batch size tuning (request unit reduction)\n\nBatch APIs reduce request count by up to 10x. SQS offers three batch\nAPIs: `SendMessageBatch`, `DeleteMessageBatch`,\n`ChangeMessageVisibilityBatch`, each handling up to 10 messages per call.\n\n→ Worked math moved to [references\u002Fworked-examples.md](references\u002Fworked-examples.md) — 10x request-unit reduction math.\n\n**Decision gate:**\n\n| Consumer pattern | Message volume | Verdict | Action |\n|---|---|---|---|\n| Producer uses `SendMessage` one-at-a-time | > 1M msgs\u002Fmonth | **FURTHER_OPTIMIZATION_AVAILABLE** | Switch to `SendMessageBatch` |\n| Consumer uses `DeleteMessage` one-at-a-time | > 1M msgs\u002Fmonth | **FURTHER_OPTIMIZATION_AVAILABLE** | Switch to `DeleteMessageBatch` |\n| Lambda ESM BatchSize = 1 | Any | **FURTHER_OPTIMIZATION_AVAILABLE** | Increase ESM BatchSize to 10 |\n| All batch APIs in use | Any | No finding | Optimal |\n\n→ Lambda ESM batch tuning CLI and notes moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\n\n### Step 3: Visibility timeout right-sizing\n\nVisibility timeout controls how long a message stays invisible after being\nreceived. If it is shorter than the consumer's processing time, the\nmessage becomes visible again and gets re-delivered — inflating both\nReceiveMessage and DeleteMessage counts.\n\n→ Worked math moved to [references\u002Fworked-examples.md](references\u002Fworked-examples.md) — re-delivery cost inflation formula.\n\n**Decision gate:**\n\n| VisibilityTimeout | Consumer processing p95 | Re-delivery rate | Verdict |\n|---|---|---|---|\n| \u003C processing p95 | measured | > 5% | **FURTHER_OPTIMIZATION_AVAILABLE** |\n| >= 6 × processing p95 | measured | \u003C 1% | No finding (optimal) |\n| 30s (default) | unknown | unknown | NEED_MORE_INFO — measure processing p95 |\n\n**Rule of thumb:** Set `VisibilityTimeout` to 6× the consumer's p95\nprocessing time. Covers retries and restarts.\n\n```bash\naws sqs set-queue-attributes \\\n  --queue-url \u003Curl> \\\n  --attributes VisibilityTimeout=120\n```\n\n→ Lambda ESM visibility note moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — ESM VisibilityTimeout overrides the queue default.\n\n### Step 4: Message retention period cost impact\n\nMessage retention controls how long SQS stores undelivered messages.\nDefault is 4 days (345,600 seconds); maximum is 14 days (1,209,600\nseconds). Retention affects storage cost, not request cost.\n\n→ Storage pricing note moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\n\n**Decision gate:**\n\n| MessageRetentionPeriod | Queue depth (visible msgs) | Verdict | Action |\n|---|---|---|---|\n| 14 days (max) AND queue depth \u003C 100 sustained | Low | **FURTHER_OPTIMIZATION_AVAILABLE** | Reduce to 4 days (limits blast radius of consumer outage) |\n| 4 days (default) AND queue depth stable | Healthy | No finding | Optimal |\n| \u003C 4 days AND messages expiring before processing | High | Investigate consumer capacity | Consumer is the bottleneck, not retention |\n\n### Step 5: DLQ redrive policy tuning\n\nDLQs capture messages that exceed `maxReceiveCount`. A backlogged DLQ\nindicates either consumer failures (poison pill messages) or\nmisconfigured maxReceiveCount (too low, causing premature DLQ routing).\n\n**DLQ health signals:**\n\n| DLQ metric | Healthy | Unhealthy |\n|---|---|---|\n| `ApproximateNumberOfMessagesVisible` | \u003C 100 | > 1,000 sustained |\n| `ApproximateAgeOfOldestMessage` | \u003C 1 hour | > 24 hours |\n| Messages flowing in (via redrive from main) | Sporadic | Continuous stream |\n\n**Decision gate:**\n\n| DLQ observation | Verdict | Action |\n|---|---|---|\n| DLQ depth > 1,000 sustained AND no redrive started | **FURTHER_OPTIMIZATION_AVAILABLE** | Start redrive via `StartMessageMoveTask` |\n| `maxReceiveCount` \u003C 3 AND DLQ depth growing | **FURTHER_OPTIMIZATION_AVAILABLE** | Increase maxReceiveCount to 5 (if consumer is transiently failing) |\n| `maxReceiveCount` > 10 AND poison-pill messages | **FURTHER_OPTIMIZATION_AVAILABLE** | Decrease maxReceiveCount; investigate consumer error handling |\n| DLQ depth \u003C 100 AND maxReceiveCount = 3-5 | No finding | Healthy |\n\n**Redrive (v2 API — batch, cost-efficient):**\n```bash\naws sqs start-message-move-task \\\n  --source-arn arn:aws:sqs:us-east-1:\u003Cacct>:\u003Cqueue-dlq> \\\n  --destination-arn arn:aws:sqs:us-east-1:\u003Cacct>:\u003Cqueue>\n```\n\nNever use the legacy per-message redrive pattern (Lambda polling DLQ and\nre-sending). The v2 API is batch-based and 10x cheaper.\n\n### Step 6: Queue type selection and FIFO high-throughput mode\n\n**Standard vs FIFO:**\n\n| Dimension | Standard | FIFO |\n|---|---|---|\n| Throughput | Nearly unlimited (API limits apply) | 300 TX\u002Fs per MessageGroupId default; 9000 TX\u002Fs batch in high-throughput mode |\n| Ordering | Best-effort | Per MessageGroupId |\n| Deduplication | None | Content-based or explicit `MessageDeduplicationId` |\n| Cost per request | Same ($0.40\u002FM) | Same ($0.40\u002FM) |\n| At-least-once | Yes | Yes (with dedup approximation to exactly-once) |\n\n**FIFO high-throughput mode decision:**\n\n| FIFO queue observation | Verdict | Action |\n|---|---|---|\n| `ThroughputLimit` absent (default queue-level 300 TX\u002Fs) AND per-MessageGroupId throughput > 300 | **FURTHER_OPTIMIZATION_AVAILABLE** | Enable `ThroughputLimit=PerMessageGroupId` + `DeduplicationScope=MessageGroup` |\n| Already in high-throughput mode | No finding | Optimal |\n| Workload needs cross-group ordering | N\u002FA | High-throughput mode breaks cross-group dedup; do not recommend |\n\n```bash\naws sqs set-queue-attributes \\\n  --queue-url \u003Cfifo-url> \\\n  --attributes DeduplicationScope=MessageGroup,ThroughputLimit=PerMessageGroupId\n```\n\n**Do NOT recommend Standard→FIFO migration purely for \"throughput\noptimization.\"** FIFO is for ordering guarantees. Standard queues already\nhave higher throughput. Only recommend FIFO→high-throughput mode (Step 6).\n\n### Step 7: Impact estimation\n\nCompute the monthly savings for each recommendation:\n\n→ Impact-estimation formulas moved to [references\u002Fworked-examples.md](references\u002Fworked-examples.md); the assumptions list below stays.\n\nAlways state assumptions: monthly request count breakdown (Send\u002FReceive\u002F\nDelete), empty receive ratio, re-delivery rate, pricing region, KMS\nstatus, FIFO mode.\n\n### Step 8: Final verdict\n\n- Any dimension recommends a change → **FURTHER_OPTIMIZATION_AVAILABLE**.\n- All dimensions pass AND queue is optimally configured → **OPTIMIZED**.\n- Change applied and verified this session → **OPTIMIZED** (with post-\n  state verification note).\n- Data insufficient (metrics absent, window \u003C 14 days) →\n  **NEED_MORE_INFO**.\n\nNever emit `FURTHER_OPTIMIZATION_AVAILABLE` without first discharging\nevery `NEED_MORE_INFO` \u002F `BLOCKED` gate.\n\n## Output format\n\n→ Template moved to [references\u002Fworked-examples.md](references\u002Fworked-examples.md); the authoritative copy is \"Required output structure\" in the STRICT output contract below.\n\nFull worked examples (long polling enablement, batch migration, FIFO\nhigh-throughput enablement, already-optimal, NEED_MORE_INFO, end-to-end\nwalkthrough) are in `references\u002Fworked-examples.md`.\n\n### Worked example — Standard queue optimized to long-polling + batch (before\u002Fafter table)\n\n→ Secondary worked example moved to [references\u002Fworked-examples.md](references\u002Fworked-examples.md) — Standard queue long-polling + batch before\u002Fafter.\n\n## STRICT output contract\n\nThe rules below are hard constraints. Violating any one produces a\nmisclassification or an arithmetic contradiction that breaks downstream\nFinOps automation. Self-check EVERY emitted block against these rules\nbefore returning the response.\n\n### Decision tree leading to the output\n\n```text\n1. Is there ≥14 days of CloudWatch data AND queue attributes?\n   ├─ NO  → VERDICT: NEED_MORE_INFO (data gate failed)\n   └─ YES → go to 2\n2. NumberOfEmptyReceives > 50% of total AND WaitTimeSeconds = 0?\n   ├─ YES → flag polling (Step 1); propose WaitTimeSeconds=20\n   └─ NO  → polling ✓\n3. Consumer uses single-message APIs (batch size 1 \u002F no batch delete)\n   AND volume > 1M msgs\u002Fmonth?\n   ├─ YES → flag batching (Step 2); propose batch APIs (size 10)\n   └─ NO  → batching ✓\n4. VisibilityTimeout \u003C consumer p95 AND re-delivery rate > 5%?\n   ├─ YES → flag visibility (Step 3); propose 6× processing p95\n   └─ NO  → visibility ✓\n5. MessageRetentionPeriod > 7 days AND queue depth \u003C 100 sustained?\n   ├─ YES → flag retention (Step 4)\n   └─ NO  → retention ✓\n6. DLQ depth > 1000 sustained OR no redrive configured?\n   ├─ YES → flag redrive (Step 5); propose StartMessageMoveTask\n   └─ NO  → redrive ✓\n7. FIFO queue at 300 TX\u002Fs AND ThroughputLimit not PerMessageGroupId?\n   ├─ YES → flag FIFO mode (Step 6)\n   └─ NO  → fifo-mode ✓ (or N\u002FA for Standard)\n8. Any flag set?\n   ├─ YES → VERDICT: FURTHER_OPTIMIZATION_AVAILABLE\n   │        compute savings, emit all 7 dimensions in \"Dimensions checked\"\n   └─ NO  → VERDICT: OPTIMIZED\n```\n\n### Required output structure\n\nEvery response MUST be a single block using these literal labels, in this\norder. Do NOT substitute markdown headings, camelCase, or bold variants.\n\n```text\nTARGET: \u003Cqueue-name>\nVERDICT: OPTIMIZED | FURTHER_OPTIMIZATION_AVAILABLE\nREASON: \u003C1-2 sentences naming the recommendation and the supporting data>\nRECOMMENDATION:\n  Current: \u003Cpolling>, \u003Cbatch>, \u003Cvisibility>, \u003Cqueue type\u002Fmode>\n  Proposed: \u003Cpolling>, \u003Cbatch>, \u003Cvisibility>, \u003Cqueue type\u002Fmode>\n  Dimensions changed: \u003Cpolling | batching | visibility | retention | redrive | queue-type>\n  Dimensions checked: \u003Clist ALL seven, each ✓ (no finding) or → (finding)>\n  Confidence: \u003CHIGH\u002FMEDIUM\u002FLOW> — \u003Cone-line rationale>\nESTIMATED_SAVINGS:\n  Current monthly: $\u003Camount>    ← MUST show request breakdown subtotals\n  Projected monthly: $\u003Camount>\n  Monthly saving: $\u003Camount>     ← MUST equal Current − Projected, 2 decimals\n  Annual saving: $\u003Camount>      ← MUST equal Monthly × 12\nMIGRATION_STEPS:\n  1. \u003Cspecific action with CLI command>\n  2. \u003Cverification step>\nCONFIRM: \u003Cconfirmation prompt text>\n```\n\n### FORBIDDEN output patterns\n\n1. **NEVER emit `VERDICT: FURTHER_OPTIMIZATION_AVAILABLE` with\n   `Monthly saving: $0.00`.** If every dimension nets zero cost delta,\n   the verdict MUST be `OPTIMIZED`.\n\n2. **NEVER show savings math that does not balance.**\n   `Current monthly − Projected monthly` MUST equal `Monthly saving`,\n   rounded to 2 decimal places.\n\n3. **NEVER emit scratch lines** (\"WAIT — recompute\", \"Hmm, let me redo\",\n   \"corrected:\") in the output. Finalize the math before emitting.\n\n4. **NEVER recommend long polling without citing the empty-receive\n   ratio.** The REASON MUST name the NumberOfEmptyReceives metric.\n\n5. **NEVER omit a dimension from the RECOMMENDATION block.** The\n   `Dimensions checked` line MUST list all seven dimensions, each marked\n   ✓ (no finding) or → (finding).\n\n6. **NEVER recommend Standard→FIFO migration as a \"throughput\n   optimization.\"** FIFO is for ordering, not throughput. Standard queues\n   have higher throughput. Reverse migrations break ordering guarantees.\n\n7. **NEVER round intermediate formula steps differently from the final\n   figure.** Compute at full precision, round only the displayed result.\n\n### Perfect example output — FURTHER_OPTIMIZATION_AVAILABLE with verified math\n\nEvery field below is internally consistent. Copy this shape exactly.\n\n```text\nTARGET: order-events-queue\nVERDICT: FURTHER_OPTIMIZATION_AVAILABLE\nREASON: Standard queue with ReceiveMessageWaitTimeSeconds=0 generating\n  85M empty receives\u002Fmonth (85% of total ReceiveMessage calls). Enabling\n  long polling (WaitTimeSeconds=20) projects a 90% reduction in empty\n  receives. Consumer also uses DeleteMessage one-at-a-time; switching to\n  DeleteMessageBatch reduces delete requests 10x.\nRECOMMENDATION:\n  Current: short polling (WaitTimeSeconds=0), single-message delete, VisibilityTimeout=30s, Standard\n  Proposed: long polling (WaitTimeSeconds=20), batch delete, VisibilityTimeout=30s, Standard\n  Dimensions changed: polling (Step 1) + batching (Step 2)\n  Dimensions checked: polling → (enable long)  batching → (batch delete)\n    visibility ✓ (30s > consumer p95 200ms)  retention ✓ (4 days, healthy)\n    redrive ✓ (maxReceiveCount=3, DLQ depth \u003C 50)  queue-type ✓ (Standard, no ordering needed)\n    fifo-mode ✓ (N\u002FA — Standard queue)\n  Confidence: HIGH — CloudWatch NumberOfEmptyReceives directly measured;\n    batch delete is a code-level change with no infrastructure risk.\nESTIMATED_SAVINGS:\n  Current monthly: $68.00\n    requests: (100M total) \u002F 1M × $0.40 = $40.00\n    empty receives: (85M empty) \u002F 1M × $0.40 = $34.00\n    Note: empty receives are counted in the 100M total above; subtotal\n    shown for attribution. Effective unique-request cost: $40.00.\n  Projected monthly: $10.60\n    requests: (26M projected total) \u002F 1M × $0.40 = $10.40\n      (15M receive + 8.5M empty @ 90% reduction + 1.5M batch delete + 1M send)\n    KMS: not applicable (SSE-SQS)\n  Monthly saving: $29.40\n    ($40.00 − $10.60 = $29.40 ✓)\n  Annual saving: $352.80\nMIGRATION_STEPS:\n  1. Enable long polling on the queue:\n     aws sqs set-queue-attributes --queue-url \u003Curl> --attributes ReceiveMessageWaitTimeSeconds=20\n  2. Update consumer to use DeleteMessageBatch instead of DeleteMessage:\n     aws sqs delete-message-batch --queue-url \u003Curl> --entries file:\u002F\u002Fbatch.json\n  3. Monitor NumberOfEmptyReceives for 7 days post-change:\n     aws cloudwatch get-metric-statistics --namespace AWS\u002FSQS --metric-name NumberOfEmptyReceives ...\n  4. Verify ApproximateAgeOfOldestMessage stays under 60s (no backlog).\nCONFIRM: About to set-queue-attributes on order-events-queue\n  (WaitTimeSeconds 0 → 20) and switch consumer to batch delete. Monthly\n  saving $29.40 (73% request reduction). Proceed? (yes\u002Fno)\n```\n\n**Self-check before emit:**\n- [ ] `Current monthly − Projected monthly == Monthly saving` (2 decimals)?\n- [ ] `Monthly saving × 12 == Annual saving`?\n- [ ] All seven dimensions listed in `Dimensions checked`?\n- [ ] Every `→` dimension has a corresponding MIGRATION_STEPS entry?\n- [ ] No scratch\u002Frecompute text in the block?\n\n## Verdict semantics\n\n| Verdict | When to emit |\n|---|---|\n| `FURTHER_OPTIMIZATION_AVAILABLE` | At least one dimension has a concrete, savings-bearing recommendation. |\n| `OPTIMIZED` | All dimensions pass (long polling enabled, batch APIs in use, visibility timeout right-sized, retention healthy, DLQ healthy). |\n| `NEED_MORE_INFO` | Data gate failed: metrics absent or window \u003C 14 days. |\n| `BLOCKED` | Hard precondition prevents evaluation: queue deleted, redrive target missing, IAM denies sqs:GetQueueAttributes. |\n\n**Zero-savings rule:** If MONTHLY_SAVING == $0.00 for every dimension,\nverdict MUST be `OPTIMIZED`, never `FURTHER_OPTIMIZATION_AVAILABLE`.\nException: a throughput improvement without direct cost change (e.g.,\nFIFO high-throughput mode for a queue at the ceiling) is surfaced in\nREASON as a throughput delta, NOT as a dollar saving — but if the queue\nis NOT at the ceiling, the verdict is `OPTIMIZED`.\n\n## Configuration dependency graph\n\n→ Moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — full configuration dependency graph.\n\n## Anti-Patterns — NEVER (top 5)\n\n1. **NEVER recommend long polling without verifying the empty-receive\n   ratio.** If the queue is dense (empty receives \u003C 10%), long polling\n   adds latency without saving cost. Always cite NumberOfEmptyReceives.\n\n2. **NEVER recommend Standard→FIFO migration as a throughput\n   optimization.** FIFO is for ordering guarantees. Standard queues have\n   higher throughput. The only queue-type throughput optimization is\n   FIFO→high-throughput mode (Step 6).\n\n3. **NEVER increase Lambda ESM BatchSize without verifying the consumer\n   handles partial batch failures.** Ensure\n   `FunctionResponseTypes: [\"ReportBatchItemFailures\"]` is set on the ESM.\n\n4. **NEVER reduce MessageRetentionPeriod on a queue with active consumer\n   outages without warning the operator.** Reducing retention drops\n   in-flight messages permanently. Retention is a data-loss dial, not a\n   cost dial.\n\n5. **NEVER use the legacy per-message DLQ redrive pattern.** Always use\n   `StartMessageMoveTask` (the v2 batch API). The Lambda-polls-DLQ-and-\n   re-sends pattern is 10x more expensive and error-prone.\n\nExtended anti-patterns in `references\u002Fworked-examples.md`.\n\n## Pre-flight safety checks (run before any remediation CLI)\n\n→ Moved to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — CONFIRM gate and 8 safety checks.\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\n## References\n\n- `references\u002Fsqs-pricing-and-batch-reference.md` — pricing tables,\n  throughput limits by queue type, batch API payload limits, FIFO\n  high-throughput mode configuration, KMS cost math, regional pricing\n  multipliers, cost calculation worked examples.\n- `references\u002Fworked-examples.md` — full worked examples (long polling\n  enablement, batch migration, FIFO high-throughput enablement, already-\n  optimal, NEED_MORE_INFO, end-to-end walkthrough) plus error handling,\n  CLI failure recovery, FIFO cross-group dedup gotchas, and extended\n  NEVER list.\n\n## References (load on demand)\n\n- [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — What this skill does, Quick start, Mindset, data-quality short-circuits, Step 0 non-obvious behaviours, Lambda ESM notes, configuration dependency graph, recent AWS features.\n- [references\u002Fworked-examples.md](references\u002Fworked-examples.md) — pre-existing; extended with the step worked-math blocks, the Output format template, and the before\u002Fafter worked example moved from SKILL.md.\n- [references\u002Fsqs-pricing-and-batch-reference.md](references\u002Fsqs-pricing-and-batch-reference.md) — pre-existing; pricing tables, batch API payload limits, FIFO high-throughput config, KMS cost math.\n- [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — pre-flight safety checks and the CONFIRM gate to run before any remediation CLI.\n\n## Domain\n\nAWS CloudOps \u002F SQS Messaging Throughput & Cost Optimization, AppIntegration\nfamily.\n\n## AWS documentation\n\n- **Amazon SQS Developer Guide** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAWSSimpleQueueService\u002Flatest\u002FSQSDeveloperGuide\u002Fwelcome.html\n- **Amazon SQS pricing** — https:\u002F\u002Faws.amazon.com\u002Fsqs\u002Fpricing\u002F\n- **SQS quotas** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAWSSimpleQueueService\u002Flatest\u002FSQSDeveloperGuide\u002Fsqs-quotas.html\n- **SQS FIFO high-throughput mode** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAWSSimpleQueueService\u002Flatest\u002FSQSDeveloperGuide\u002Fhigh-throughput-fifo.html\n- **SQS visibility timeout** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAWSSimpleQueueService\u002Flatest\u002FSQSDeveloperGuide\u002Fsqs-visibility-timeout.html\n- **SQS message timers** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAWSSimpleQueueService\u002Flatest\u002FSQSDeveloperGuide\u002Fsqs-delay-queues.html\n- **SQS dead-letter queues** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAWSSimpleQueueService\u002Flatest\u002FSQSDeveloperGuide\u002Fsqs-dead-letter-queues.html\n- **SQS redrive (StartMessageMoveTask)** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAWSSimpleQueueService\u002Flatest\u002FSQSDeveloperGuide\u002Fsqs-configure-dead-letter-queue-redrive.html\n- **Lambda event source mappings (SQS)** — https:\u002F\u002Fdocs.aws.amazon.com\u002Flambda\u002Flatest\u002Fdg\u002Fwith-sqs.html\n- **AWS CLI SQS reference** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fcli\u002Flatest\u002Freference\u002Fsqs\u002F\n- **AWS Well-Architected Framework — Cost Optimization** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fwellarchitected\u002Flatest\u002Fcost-optimization-pillar\u002Fwelcome.html\n",{"name":5,"license":15,"metadata":24,"description":7,"compatibility":44},{"tags":25,"phase":26,"author":27,"domain":28,"family":29,"version":30,"keywords":31,"task_type":32,"complexity":33,"entry_point":34,"skill_class":35,"when_to_use":36,"requires_llm":37,"verdict_shape":38,"when_not_to_use":39,"lifecycle_status":40,"invocation_schema":41,"supports_pipeline":37,"invocation_example":42,"activation_triggers":43},"sqs, messaging, app-integration, cost-optimization, finops, throughput","3","Jacky Chan — AWS Community Builder","aws-cloudops","AppIntegration","0.1.0","SQS, throughput optimization, cost optimization, FIFO, Standard queue, long polling, short polling, batch size, visibility timeout, message retention, DLQ, dead-letter queue, redrive policy, high-throughput mode, DeduplicationScope, ThroughputLimit, MessageGroupId, SSE-KMS, cross-region messaging, FinOps, AppIntegration","optimize","medium","false","capability","Optimising SQS queue throughput, reducing empty receives via long polling, tuning batch size on consumers, right-sizing visibility timeout, reducing DLQ backlog via redrive policy adjustments, enabling FIFO high-throughput mode, or reviewing per-queue SQS API request spend.","true","OPTIMIZED | FURTHER_OPTIMIZATION_AVAILABLE","SNS topic cost (use sns-topic-optimizer), EventBridge bus cost (use eventbridge-bus-optimizer), Kinesis Data Streams throughput (use kinesis-stream-optimizer), or functional SQS troubleshooting (message not arriving, permission denied — use the SQS troubleshooter). This skill focuses on throughput and cost-driven optimization decisions, not functional debugging of broken queues.","active","Input: either (a) a queue URL + live-account context, (b) a pasted set of CloudWatch SQS metrics with at least 14 days of observation, OR (c) a queue configuration document (queue type, attributes, redrive policy, consumer batch settings). Output: a deterministic TARGET\u002FVERDICT\u002FREASON\u002FRECOMMENDATION\u002FESTIMATED_SAVINGS\u002FMIGRATION_STEPS block per queue, where VERDICT is one of OPTIMIZED, FURTHER_OPTIMIZATION_AVAILABLE.","# Minimal valid input (offline metric classification): QueueName: order-events-queue QueueType: Standard Region: us-east-1 Attributes:\n  ReceiveMessageWaitTimeSeconds: 0\n  VisibilityTimeout: 30\n  MessageRetentionPeriod: 345600 (4 days)\n  DelaySeconds: 0\n  RedrivePolicy: {\"deadLetterTargetArn\":\"arn:...\",\"maxReceiveCount\":\"3\"}\nConsumer config:\n  Lambda ESM BatchSize: 1\n  MaximumBatchingWindowInSeconds: 0\nMetrics (last 30 days):\n  - NumberOfEmptyReceives: 85,000,000\u002Fmonth\n  - NumberOfMessagesReceived: 15,000,000\u002Fmonth\n  - ApproximateNumberOfMessagesVisible: 2,000 avg\n  - ApproximateAgeOfOldestMessage: 45 seconds avg\nEmit the standard optimization block (TARGET, VERDICT, REASON, RECOMMENDATION, ESTIMATED_SAVINGS, MIGRATION_STEPS).","optimise SQS throughput, SQS cost optimization, SQS long polling, SQS batch size, SQS empty receives, SQS visibility timeout, SQS DLQ redrive, SQS FIFO high throughput, SQS message retention cost, SQS SSE-KMS cost, SQS FinOps savings, SQS request units, reduce SQS bill, queue throughput review","Agent runtime that reads SKILL.md (Claude Code, Cursor, Windsurf, Codex, Gemini). Offline recommendation classification works from pasted CloudWatch metrics. Live-account optimization uses aws sqs list-queues, aws sqs get-queue-attributes, aws sqs get-queue-url, aws cloudwatch get-metric-statistics (ApproximateNumberOfMessagesVisible, ApproximateAgeOfOldestMessage, NumberOfEmptyReceives, NumberOfMessagesSent, NumberOfMessagesReceived, NumberOfMessagesDeleted), aws ce get-cost-and-usage (AWS...","main","eeace51bd5dd1db2030729d83eeab988861553aa","skills\u002Fsqs-throughput-optimizer",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":54,"prompt":64,"zipAvailable":65},[55,58,61],{"tool":56,"command":57},"npx","npx skills add jhkchan\u002Faws-agent-skills --skill sqs-throughput-optimizer",{"tool":59,"command":60},"bunx","bunx skills add jhkchan\u002Faws-agent-skills --skill sqs-throughput-optimizer",{"tool":62,"command":63},"pnpm","pnpm dlx skills add jhkchan\u002Faws-agent-skills --skill sqs-throughput-optimizer","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsqs-throughput-optimizer\u002FSKILL.md",true,[67,73,77,81,85,89,93,97,101,105,109,113,117,121,125,129,133,137,141],{"path":68,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":71,"sourceHtmlUrl":72},"eval\u002Ftest-cases.yaml","REFERENCE","参考文档",11533,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsqs-throughput-optimizer\u002Feval\u002Ftest-cases.yaml",{"path":74,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":75,"sourceHtmlUrl":76},"evals\u002Fbaselines\u002Falready-optimized-queue.md",721,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsqs-throughput-optimizer\u002Fevals\u002Fbaselines\u002Falready-optimized-queue.md",{"path":78,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":79,"sourceHtmlUrl":80},"evals\u002Fbaselines\u002Fbatch-api-migration.md",962,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsqs-throughput-optimizer\u002Fevals\u002Fbaselines\u002Fbatch-api-migration.md",{"path":82,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":83,"sourceHtmlUrl":84},"evals\u002Fbaselines\u002Ffifo-high-throughput-mode.md",1012,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsqs-throughput-optimizer\u002Fevals\u002Fbaselines\u002Ffifo-high-throughput-mode.md",{"path":86,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":87,"sourceHtmlUrl":88},"evals\u002Fbaselines\u002Flong-polling-enablement.md",976,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsqs-throughput-optimizer\u002Fevals\u002Fbaselines\u002Flong-polling-enablement.md",{"path":90,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":91,"sourceHtmlUrl":92},"evals\u002Fbaselines\u002Fvisibility-timeout-rightsizing.md",1095,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsqs-throughput-optimizer\u002Fevals\u002Fbaselines\u002Fvisibility-timeout-rightsizing.md",{"path":94,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":95,"sourceHtmlUrl":96},"evals\u002Feval_config.yaml",1785,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsqs-throughput-optimizer\u002Fevals\u002Feval_config.yaml",{"path":98,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":99,"sourceHtmlUrl":100},"evals\u002Fevals.json",4431,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsqs-throughput-optimizer\u002Fevals\u002Fevals.json",{"path":102,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":103,"sourceHtmlUrl":104},"evals\u002Fprompts\u002Falready-optimized-queue.md",1642,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsqs-throughput-optimizer\u002Fevals\u002Fprompts\u002Falready-optimized-queue.md",{"path":106,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":107,"sourceHtmlUrl":108},"evals\u002Fprompts\u002Fbatch-api-migration.md",1429,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsqs-throughput-optimizer\u002Fevals\u002Fprompts\u002Fbatch-api-migration.md",{"path":110,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":111,"sourceHtmlUrl":112},"evals\u002Fprompts\u002Ffifo-high-throughput-mode.md",1428,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsqs-throughput-optimizer\u002Fevals\u002Fprompts\u002Ffifo-high-throughput-mode.md",{"path":114,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":115,"sourceHtmlUrl":116},"evals\u002Fprompts\u002Flong-polling-enablement.md",1350,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsqs-throughput-optimizer\u002Fevals\u002Fprompts\u002Flong-polling-enablement.md",{"path":118,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":119,"sourceHtmlUrl":120},"evals\u002Fprompts\u002Fvisibility-timeout-rightsizing.md",1448,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsqs-throughput-optimizer\u002Fevals\u002Fprompts\u002Fvisibility-timeout-rightsizing.md",{"path":122,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":123,"sourceHtmlUrl":124},"examples\u002FREADME.md",7255,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsqs-throughput-optimizer\u002Fexamples\u002FREADME.md",{"path":126,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":127,"sourceHtmlUrl":128},"references\u002Fadvanced-patterns.md",9569,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsqs-throughput-optimizer\u002Freferences\u002Fadvanced-patterns.md",{"path":130,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":131,"sourceHtmlUrl":132},"references\u002Fdiagnostic-commands.md",1251,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsqs-throughput-optimizer\u002Freferences\u002Fdiagnostic-commands.md",{"path":134,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":135,"sourceHtmlUrl":136},"references\u002Fsqs-pricing-and-batch-reference.md",7792,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsqs-throughput-optimizer\u002Freferences\u002Fsqs-pricing-and-batch-reference.md",{"path":138,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":139,"sourceHtmlUrl":140},"references\u002Fworked-examples.md",17336,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsqs-throughput-optimizer\u002Freferences\u002Fworked-examples.md",{"path":142,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":143,"sourceHtmlUrl":144},"skill.usf.yaml",4532,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsqs-throughput-optimizer\u002Fskill.usf.yaml",[146,153,160,167,174,181],{"skillNo":147,"name":148,"nameZh":6,"description":149,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":150,"categories":151,"keywords":152,"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":154,"name":155,"nameZh":6,"description":156,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":157,"categories":158,"keywords":159,"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":161,"name":162,"nameZh":6,"description":163,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":164,"categories":165,"keywords":166,"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":168,"name":169,"nameZh":6,"description":170,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":171,"categories":172,"keywords":173,"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":175,"name":176,"nameZh":6,"description":177,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":178,"categories":179,"keywords":180,"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":182,"name":183,"nameZh":6,"description":184,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":185,"categories":186,"keywords":187,"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",[],[]]