[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7A6CH094EETW14VQMZ5WHVG":3,"skill-same:01M7A6CH094EETW14VQMZ5WHVG":147},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":46,"repositoryHtmlUrl":47,"repositoryHomepageUrl":6,"ownerHtmlUrl":48,"ownerBlogUrl":6,"ownerDescription":49,"updatedAt":50,"install":51,"resources":64},"01M7A6CH094EETW14VQMZ5WHVG","cost-anomaly-detection-automator",null,"Designs and implements automated AWS Cost Anomaly Detection workflows spanning Cost Anomaly Monitor creation (service-level, linked account, dimension-based monitor), anomaly alert subscription (SNS topic, email recipient, Lambda webhook), severity-based anomaly routing (Critical = page on-call, High = notify channel, Low = log to dashboard), auto-remediation Lambda functions (tag untagged resources, right-size over-provisioned instances, shutdown non-production environments after-hours), AWS Budgets integration for hard spend limits with threshold alerts, Cost Explorer anomaly analysis for deep-dive on detected anomalies, multi-account coverage via Organizations Payer monitor, Slack and Microsoft Teams webhook notifications, anomaly feedback submission (true positive versus false positive) to improve ML model accuracy, and historical baseline establishment using contribution analysis. Emits AUTOMATION_DEPLOYED with a fully wired monitor-alert- remediation pipeline or REVIEW_REQUIRED with the specific...","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\u002Fcost-anomaly-detection-automator\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: cost-anomaly-detection-automator\ndescription: Designs and implements automated AWS Cost Anomaly Detection workflows spanning Cost Anomaly Monitor creation (service-level, linked account, dimension-based monitor), anomaly alert subscription (SNS topic, email recipient, Lambda webhook), severity-based anomaly routing (Critical = page on-call, High = notify channel, Low = log to dashboard), auto-remediation Lambda functions (tag untagged resources, right-size over-provisioned instances, shutdown non-production environments after-hours), AWS Budgets integration for hard spend limits with threshold alerts, Cost Explorer anomaly analysis for deep-dive on detected anomalies, multi-account coverage via Organizations Payer monitor, Slack and Microsoft Teams webhook notifications, anomaly feedback submission (true positive versus false positive) to improve ML model accuracy, and historical baseline establishment using contribution analysis. Emits AUTOMATION_DEPLOYED with a fully wired monitor-alert- remediation pipeline or REVIEW_REQUIRED with the specific...\nlicense: Apache-2.0\ncompatibility: Agent runtime that reads SKILL.md (Claude Code, Cursor, Windsurf, Codex, Gemini). No AWS CLI required for offline workflow design. Live deployment uses aws ce create-anomaly-monitor, create-anomaly-subscription, get-anomalies, provide-anomaly-feedback, aws budgets create-budget, and aws ce get-cost-and-usage — AWS CLI v2, SSO or key-based credentials.\nmetadata:\n  domain: aws-cloudops\n  complexity: high\n  requires_llm: 'true'\n  phase: '4'\n  supports_pipeline: 'true'\n  entry_point: 'false'\n  family: FinOps\n  task_type: automate\n  skill_class: capability\n  lifecycle_status: active\n  verdict_shape: AUTOMATION_DEPLOYED | REVIEW_REQUIRED\n  when_to_use: Building cost anomaly detection automation, creating Cost Anomaly Monitors (service, linked-account, or dimension-based), wiring severity-routed alert subscriptions, integrating Budgets hard-limits with anomaly detection, deploying auto-remediation Lambda for spend spikes, setting up multi-account coverage via Organizations Payer, or adding Slack\u002FTeams webhook notifications for cost anomalies.\n  activation_triggers: automate cost anomaly detection, create Cost Anomaly Monitor, create-anomaly-subscription, severity routing cost anomaly, Budgets integration anomaly, auto-remediation cost spike, tag untagged resources Lambda, Organizations Payer anomaly, Slack webhook cost alert, anomaly feedback true positive\n  invocation_schema: 'Input: either (a) a cost anomaly detection requirement (\"alert on EC2 spend spikes\", \"auto-tag untagged resources causing cost anomalies\"), OR (b) an existing Cost Anomaly Monitor configuration to extend with severity routing or auto-remediation. Output: deterministic ANOMALY block per monitor — MONITOR\u002FSUBSCRIPTION\u002FROUTING\u002FREMEDIATION\u002FAUDIT\u002F VERDICT — where VERDICT is AUTOMATION_DEPLOYED (pipeline ready) or REVIEW_REQUIRED (specific gap cited).'\n  version: 0.1.0\n  author: Jacky Chan — AWS Community Builder\n  keywords: AWS Cost Anomaly Detection, Cost Anomaly Monitor, Anomaly Subscription, AWS Budgets, Cost Explorer, contribution analysis, service-level monitor, linked account monitor, Organizations Payer, severity routing, auto-remediation Lambda, tag untagged resources, Slack webhook, anomaly feedback, FinOps\n  tags: aws-cost-anomaly-detection, aws-budgets, cost-explorer, finops, auto-remediation, anomaly-detection, automate\n---\n\n# Cost Anomaly Detection Automator\n\n## Mindset\n\n**One-line takeaway:** cost anomaly automation is a four-stage pipeline —\n**detect** (Cost Anomaly Monitor uses ML on historical spend) → **alert**\n(anomaly subscription routes to SNS, email, or Lambda webhook) → **react**\n(severity-based routing: Critical = page, High = notify, Low = log) →\n**remediate** (Lambda auto-remediation: tag untagged resources, right-size,\nshutdown non-prod). A gap in ANY stage produces silent cost leakage.\n\n- **Detection** without **subscription** is invisible: the monitor\n  detects anomalies but no alert is emitted. This is the most common\n  misconfiguration — operators create the monitor and forget the\n  subscription.\n- **Cost Anomaly Detection and AWS Budgets are complementary, not\n  redundant.** Cost Anomaly Detection uses ML on historical spend patterns.\n  Budgets use static thresholds. Service-level monitors catch per-service\n  spikes; account-level monitors catch total spend. Use both.\n- **Severity routing is the operator's lever.** Critical anomalies page\n  the on-call; High anomalies notify a Slack channel; Low anomalies log\n  to a dashboard. Without severity routing, every anomaly pages — or\n  worse, none do because the team muted everything.\n\n## Quick navigation\n\n| You want to... | Go to |\n|---|---|\n| Create a service-level Cost Anomaly Monitor | Step 2 + Appendix A |\n| Decide monitor type (service vs linked-account vs dimension) | Step 1 + Step 2 |\n| Wire anomaly subscription with severity routing | Step 3 + Step 4 |\n| Build auto-remediation Lambda for cost spikes | Step 5 |\n| Integrate Budgets for hard limits | Step 6 |\n| Set up multi-account via Organizations Payer | Step 7 |\n| Add Slack or Teams webhook notifications | Step 8 |\n| Submit anomaly feedback (true\u002Ffalse positive) | Step 9 |\n| Analyze a detected anomaly via Cost Explorer | Step 10 |\n| Avoid common pitfall patterns | Anti-Patterns |\n| Recent features (contribution analysis, feedback) | Recent AWS features |\n\n## Critical rules at a glance (do NOT bury these)\n\n1. **A Cost Anomaly Monitor without a subscription detects anomalies\n   silently.** `create-anomaly-monitor` creates the detection engine;\n   `create-anomaly-subscription` creates the alert delivery. Separate\n   API calls. Operators frequently create the monitor and assume alerts\n   are wired. Always pair them and verify with\n   `get-anomaly-subscriptions`.\n2. **Cost Anomaly Detection needs at least 10 days of data to establish\n   a baseline.** A brand-new account or a newly enabled service has\n   insufficient history. The first 10 days are a warm-up period with\n   reduced sensitivity.\n3. **Budgets are static thresholds; Cost Anomaly Detection is dynamic\n   (ML-based).** Budgets catch \"we spent more than $X total.\" Anomaly\n   Detection catches \"EC2 spend on Tuesday is 3x the normal pattern.\"\n   Never substitute one for the other — use both.\n4. **Service-level and account-level monitors catch DIFFERENT\n   anomalies.** A service-level monitor on EC2 catches an EC2 spike even\n   if total account spend looks normal. An account-level monitor catches\n   total spend deviations regardless of which service caused them.\n   Deploy both for full coverage.\n5. **Anomaly feedback improves the ML model.** `provide-anomaly-feedback`\n   with `isTruePositive: true|false` trains the model to reduce false\n   positives over time. Without feedback, false positive rate stays flat.\n\n## Pre-flight: data requirements\n\n| Input | Source | Why |\n|---|---|---|\n| Account ID or Payer ID | `aws organizations list-accounts` | Scope of monitor |\n| Monitor type | Service, linked-account, or dimension-based | Detection granularity |\n| Target service(s) | `aws ce get-cost-and-usage --group-by Type=DIMENSION,Value=SERVICE` | For service-level monitors |\n| SNS topic ARN | `aws sns create-topic` | Alert delivery endpoint |\n| Lambda function ARN | `aws lambda create-function` | Auto-remediation endpoint |\n| Existing monitors | `aws ce get-anomaly-monitors` | Don't duplicate |\n| Existing subscriptions | `aws ce get-anomaly-subscriptions` | Don't overwrite blindly |\n| Existing budgets | `aws budgets describe-budgets --account-id \u003Cid>` | Check before creating new |\n| Slack\u002FTeams webhook URL | Incoming webhook config | Notification channel |\n\n**If the input is malformed** (missing account ID, ambiguous monitor\ntype), emit:\n\n```text\nANOMALY: \u003Creference>\nMONITOR: \u003Cmonitor-name>\nVERDICT: ERROR\nREASON: Cannot design anomaly pipeline — account ID and monitor type are required.\nGAP: Re-supply the account ID, desired monitor type, and target service or dimension.\n```\n\n## Process — Pipeline design (apply in order)\n\n### Step 0: Expert knowledge — non-obvious Cost Anomaly behaviors\n\nStep 0 expert knowledge (daily-not-real-time evaluation, 10-day ML warm-up, async monitor PENDING state, operator-defined severity thresholds, rootCauseService accuracy, SNS\u002Femail\u002FLambda targets, Budgets independence, per-anomaly feedback, dimension vs service monitors, Payer coverage) moved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\nLoad on demand before designing the pipeline..\n\n### Step 1: Classify the monitoring requirement\n\n| Requirement | Monitor type | Example |\n|---|---|---|\n| Catch total spend deviations | `DIMENSION` on `PAYER_ACCOUNT` | \"Alert if total monthly spend spikes\" |\n| Catch per-service spikes | `DIMENSION` on `SERVICE` | \"Alert if EC2 or S3 spend spikes\" |\n| Catch per-account spend (multi-account) | `DIMENSION` on `LINKED_ACCOUNT` | \"Alert if linked account 2222 spend spikes\" |\n| Catch per-region\u002Finstance-type spikes | `DIMENSION` on `REGION` or `INSTANCE_TYPE` | \"Alert if GPU instance spend spikes\" |\n| Broad ML-based detection across all services | `DIMENSION` on `SERVICE` (all values) | Default Coverage monitor |\n\nIf ambiguous, default to `DIMENSION` on `SERVICE` for the top 3 services\nby spend (query Cost Explorer to identify them).\n\n### Step 2: Create the Cost Anomaly Monitor\n\n```bash\n# Service-level monitor (EC2)\naws ce create-anomaly-monitor \\\n  --anomaly-monitor '{\n    \"MonitorName\": \"ec2-spend-anomaly-monitor\",\n    \"MonitorType\": \"DIMENSION\",\n    \"MonitorDimension\": \"SERVICE\",\n    \"MonitorSpecification\": \"{\\\"Dimensions\\\":{\\\"Key\\\":\\\"SERVICE\\\",\\\"Values\\\":[\\\"Amazon Elastic Compute Cloud - Compute\\\"],\\\"MatchOptions\\\":[\\\"EQUALS\\\"]}}\"\n  }'\n```\n\nLinked-account monitor:\n\n```bash\naws ce create-anomaly-monitor \\\n  --anomaly-monitor '{\n    \"MonitorName\": \"linked-account-2222-anomaly\",\n    \"MonitorType\": \"DIMENSION\",\n    \"MonitorDimension\": \"LINKED_ACCOUNT\",\n    \"MonitorSpecification\": \"{\\\"Dimensions\\\":{\\\"Key\\\":\\\"LINKED_ACCOUNT\\\",\\\"Values\\\":[\\\"222222222222\\\"],\\\"MatchOptions\\\":[\\\"EQUALS\\\"]}}\"\n  }'\n```\n\nVerify the monitor is ACTIVE before proceeding:\n\n```bash\naws ce get-anomaly-monitors \\\n  --monitor-arn-list \u003Cmonitor-arn> \\\n  --query 'AnomalyMonitors[0].[MonitorName,MonitorType,MonitorStatus]'\n```\n\nIf `MonitorStatus` is `PENDING`, wait and re-check. A subscription\nagainst a `PENDING` monitor silently fails to alert.\n\n### Step 3: Create the anomaly subscription with severity routing\n\nSeverity routing is achieved by creating multiple subscriptions with\ndifferent thresholds targeting different endpoints.\n\n```bash\n# Critical: threshold >= 50% -> SNS topic that pages on-call\naws ce create-anomaly-subscription \\\n  --anomaly-subscription '{\n    \"SubscriptionName\": \"critical-cost-anomaly\",\n    \"Threshold\": 50.0,\n    \"Frequency\": \"IMMEDIATE\",\n    \"MonitorArn\": \"\u003Cmonitor-arn>\",\n    \"Subscribers\": [\n      {\"Address\": \"arn:aws:sns:us-east-1:111111111111:critical-cost-alerts\", \"Type\": \"SNS\"}\n    ]\n  }'\n\n# High: threshold >= 20% -> SNS topic that notifies Slack\naws ce create-anomaly-subscription \\\n  --anomaly-subscription '{\n    \"SubscriptionName\": \"high-cost-anomaly\",\n    \"Threshold\": 20.0,\n    \"Frequency\": \"DAILY\",\n    \"MonitorArn\": \"\u003Cmonitor-arn>\",\n    \"Subscribers\": [\n      {\"Address\": \"arn:aws:sns:us-east-1:111111111111:high-cost-alerts\", \"Type\": \"SNS\"}\n    ]\n  }'\n```\n\n**Severity threshold mapping (recommended starting point):**\n\n| Severity | Threshold | Frequency | Routing |\n|---|---|---|---|\n| Critical | >= 50% deviation | IMMEDIATE | Page on-call (PagerDuty via SNS) |\n| High | 20-50% deviation | DAILY | Slack\u002FTeams notification via SNS → Lambda |\n| Low | \u003C 20% deviation | WEEKLY | Log to dashboard; no active notification |\n\nStep 3 subscription-creation error table (ValidationException on PENDING monitor, AccessDeniedException, LimitExceededException, no-alerts SNS policy) moved verbatim to [references\u002Ferror-handling.md](references\u002Ferror-handling.md).\nLoad on demand when the subscription API fails..\n\n### Step 4: Wire SNS fan-out for multi-channel routing\n\nSNS is the recommended subscriber type — it fans out to Lambda, email,\nSQS, and HTTPS webhooks from a single subscription.\n\n```bash\naws sns create-topic --name critical-cost-alerts\n\n# Lambda subscriber for severity routing and Slack formatting\naws sns subscribe \\\n  --topic-arn arn:aws:sns:us-east-1:111111111111:critical-cost-alerts \\\n  --protocol lambda \\\n  --notification-endpoint arn:aws:lambda:us-east-1:111111111111:function:cost-anomaly-router\n```\n\nSNS topic policy — allow Cost Anomaly Detection to publish:\n\n```json\n{\n  \"Version\": \"2012-10-17\",\n  \"Statement\": [{\n    \"Effect\": \"Allow\",\n    \"Principal\": {\"Service\": \"events.costanomaly.amazonaws.com\"},\n    \"Action\": \"sns:Publish\",\n    \"Resource\": \"arn:aws:sns:us-east-1:111111111111:critical-cost-alerts\"\n  }]\n}\n```\n\nA missing topic policy entry for `events.costanomaly.amazonaws.com` is\nthe single most common cause of \"subscription created but no alerts\nreceived.\"\n\n### Step 5: Build the auto-remediation Lambda\n\nThe Lambda receives the SNS message containing the anomaly JSON and\nperforms remediation based on the root cause.\n\nStep 5 auto-remediation Lambda (full Python: severity from maxImpact, EC2 tag-and-stop remediation, Slack notify, auto feedback) moved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\nLoad on demand when building the remediation function..\n\n**Decision rule:** default to **notify-only** unless ALL of the\nfollowing are true: (a) the remediation is reversible within 15\nminutes, (b) the Lambda has been tested in non-production, (c) the\nremediation is scoped to non-prod resources (or has an explicit\nproduction-impact assessment), (d) the action is logged to CloudTrail.\n\n### Step 6: Integrate AWS Budgets for hard limits\n\nBudgets complement anomaly detection with static thresholds.\n\nStep 6 create-budget CLI (ACTUAL 80% + FORECASTED 100% notifications with SNS subscribers) moved verbatim to [references\u002Fbudgets-and-anomaly-integration.md](references\u002Fbudgets-and-anomaly-integration.md).\nLoad on demand when wiring Budgets hard limits..\n\n| Dimension | Cost Anomaly Detection | AWS Budgets |\n|---|---|---|\n| Detection method | ML on historical patterns | Static threshold |\n| Sensitivity | Dynamic (adapts to trends) | Fixed (operator-defined) |\n| Best for | Unexpected pattern deviations | Hard spend limits |\n| False positive rate | Decreases with feedback | Zero (threshold is exact) |\n\n### Step 7: Multi-account via Organizations Payer\n\nStep 7 Payer-level monitor CLI and the Payer-account constraint + per-linked-account Lambda routing moved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\nLoad on demand for multi-account coverage..\n\n### Step 8: Slack and Teams webhook notifications\n\nThe Lambda router formats and sends notifications. Configure the webhook\nURL as a Lambda environment variable.\n\nStep 8 Slack message formatter (severity-colored attachments) and Teams Adaptive Card note moved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\nLoad on demand when wiring webhooks..\n\n### Step 9: Submit anomaly feedback\n\nStep 9 provide-anomaly-feedback CLI and automated feedback rules (false-positive service list, impact threshold) moved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\nLoad on demand when closing the feedback loop..\n\n### Step 10: Analyze anomalies via Cost Explorer\n\nStep 10 Cost Explorer breakdown queries (by service, by usage type for the root-cause service) and contribution-analysis confirmation moved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\nLoad on demand when deep-diving a detected anomaly..\n\n## Output format\n\n```text\nANOMALY: \u003Creference>\nMONITOR:\n  - Name: \u003Cmonitor-name>\n  - Type: DIMENSION (SERVICE | LINKED_ACCOUNT | REGION)\n  - Status: ACTIVE | PENDING\n  - Scope: \u003Cservice or account coverage>\nSUBSCRIPTION:\n  - Severity routing: Critical (>=50%), High (20-50%), Low (\u003C20%)\n  - Endpoints: SNS topic(s), email(s), Lambda ARN(s)\n  - Frequency: IMMEDIATE | DAILY | WEEKLY\nROUTING:\n  - Critical: \u003Con-call page mechanism>\n  - High: \u003CSlack\u002FTeams notification>\n  - Low: \u003Cdashboard log>\nREMEDIATION:\n  - Actions: \u003Ctag untagged, right-size, shutdown non-prod, notify-only>\n  - Lambda: \u003Cfunction ARN or \"NOT WIRED\">\n  - Scope: \u003Cproduction | non-production | all>\n  - Safety: \u003Cdry-run, approval gate, production-impact assessment>\nAUDIT:\n  - Budgets: \u003Cbudget name(s) and threshold(s)>\n  - Feedback: \u003Cauto-feedback rules>\n  - Baseline: \u003Ctrailing 90-day average>\nVERDICT: AUTOMATION_DEPLOYED | REVIEW_REQUIRED\nGAP: \u003Cif REVIEW_REQUIRED, the specific missing piece>\nTEMPLATE: \u003CCLI snippet for the monitor + subscription>\n```\n\n### Worked example — AUTOMATION_DEPLOYED, EC2 service-level monitor\n\n```text\nANOMALY: ec2-spend-anomaly\nMONITOR:\n  - Name: ec2-spend-anomaly-monitor\n  - Type: DIMENSION (SERVICE=Amazon Elastic Compute Cloud - Compute)\n  - Status: ACTIVE\n  - Scope: EC2 spend in account 111111111111\nSUBSCRIPTION:\n  - Severity routing: Critical (>=50%), High (20-50%), Low (\u003C20%)\n  - Endpoints: SNS arn:aws:sns:us-east-1:111111111111:critical-cost-alerts\n  - Frequency: IMMEDIATE for Critical, DAILY for High\nROUTING:\n  - Critical: SNS → Lambda → PagerDuty + Slack #finops-critical\n  - High: SNS → Lambda → Slack #finops-alerts\n  - Low: CloudWatch dashboard log\nREMEDIATION:\n  - Actions: tag untagged EC2 instances; shutdown non-prod if Critical\n  - Lambda: arn:aws:lambda:us-east-1:111111111111:function:cost-anomaly-router\n  - Scope: non-production only (production = notify-only)\n  - Safety: dry-run tagging; production-impact assessment before shutdown\nAUDIT:\n  - Budgets: monthly-cost-budget ($10K, 80% actual, 100% forecast)\n  - Feedback: auto-true-positive for impact >= $200\n  - Baseline: trailing 90-day EC2 average $2,340\u002Fday\nVERDICT: AUTOMATION_DEPLOYED\nGAP: None\nTEMPLATE:\n  aws ce create-anomaly-monitor --anomaly-monitor '{\"MonitorName\":\"ec2-spend-anomaly-monitor\",\"MonitorType\":\"DIMENSION\",\"MonitorDimension\":\"SERVICE\",\"MonitorSpecification\":\"{\\\"Dimensions\\\":{\\\"Key\\\":\\\"SERVICE\\\",\\\"Values\\\":[\\\"Amazon Elastic Compute Cloud - Compute\\\"],\\\"MatchOptions\\\":[\\\"EQUALS\\\"]}}\"}'\n  aws ce create-anomaly-subscription --anomaly-subscription '{\"SubscriptionName\":\"critical-cost-anomaly\",\"Threshold\":50.0,\"Frequency\":\"IMMEDIATE\",\"MonitorArn\":\"\u003Cmonitor-arn>\",\"Subscribers\":[{\"Address\":\"arn:aws:sns:us-east-1:111111111111:critical-cost-alerts\",\"Type\":\"SNS\"}]}'\n```\n\n### Worked example — REVIEW_REQUIRED, monitor without subscription\n\nWorked example — REVIEW_REQUIRED, monitor without subscription (NOT-WIRED routing\u002Fremediation\u002Faudit rows) moved verbatim to [references\u002Fworked-examples.md](references\u002Fworked-examples.md).\nLoad on demand for the REVIEW_REQUIRED output shape..\n\n## Anti-Patterns — NEVER do these things\n\n- NEVER create a Cost Anomaly Monitor without a corresponding anomaly\n  subscription. The monitor detects; the subscription delivers. Without\n  the subscription, anomalies are detected silently — operators believe\n  coverage exists but receive zero alerts.\n\n- NEVER substitute AWS Budgets for Cost Anomaly Detection or vice versa.\n  Budgets use static thresholds; Anomaly Detection uses ML on patterns.\n  They catch different anomaly classes. Use both.\n\n- NEVER expect real-time anomaly detection. Cost Anomaly Detection\n  evaluates daily data (8-24 hour lag). For real-time protection, pair\n  with CloudWatch billing alarms.\n\n- NEVER configure auto-remediation Lambda for production resources\n  without an impact assessment. A Critical anomaly that triggers\n  `stop_instances` on production EC2 causes an immediate outage. Scope\n  auto-remediation to non-prod by default.\n\n- NEVER omit the SNS topic policy entry for\n  `events.costanomaly.amazonaws.com`. Without this principal, Cost\n  Anomaly Detection cannot publish to the SNS topic. The subscription\n  appears correct but no alerts are ever delivered.\n\n- NEVER assume the `rootCauseService` field is always accurate. It is\n  ML-inferred. Cross-reference with Cost Explorer contribution analysis\n  before acting on auto-remediation.\n\n- NEVER skip anomaly feedback submission. Without feedback, the ML\n  model never improves its false-positive rate. Alert fatigue increases\n  and operators mute all anomaly alerts.\n\n- NEVER create a dimension-based monitor with a dimension value that\n  does not exist in Cost Explorer billing data. The monitor is created\n  successfully but never detects anomalies (zero cost data). Always\n  verify the dimension value via `get-cost-and-usage` first.\n\n- NEVER deploy a single subscription for all severity levels. A\n  threshold of 10% floods the on-call with low-impact anomalies. Create\n  separate subscriptions per severity tier.\n\n- NEVER assume a Payer-level monitor provides per-linked-account alert\n  routing. The Lambda router must extract `accountId` from the payload\n  and route accordingly.\n\n- NEVER set the auto-remediation Lambda timeout below 60 seconds.\n  Tagging resources and calling EC2 APIs take time. A 3-second default\n  timeout produces partial remediation with no retry.\n\n- NEVER forget to verify the monitor's `monitorStatus` is `ACTIVE`\n  before creating subscriptions. A subscription against a `PENDING`\n  monitor silently fails.\n\n- NEVER omit the Lambda DLQ for the auto-remediation Lambda. Failed\n  invocations are lost without a DLQ. Configure SQS DLQ and alarm on\n  queue depth.\n\n- NEVER use `Frequency: IMMEDIATE` for all severity tiers. Reserve\n  `IMMEDIATE` for Critical; use `DAILY` for High and `WEEKLY` for Low.\n\n- NEVER create Budgets without verifying existing budgets first. AWS\n  Budgets has per-account limits. Always call `describe-budgets` before\n  `create-budget`.\n\n## Pre-flight safety checks (run before applying any pipeline CLI)\n\n- **MANDATORY CONFIRMATION GATE.** Before any state-changing operation,\n  emit: `CONFIRM: About to \u003Caction> for account \u003Caccount>. This affects\n  \u003Cconsequence>. Proceed? (yes\u002Fno)`\n\n- **Back up the current configuration** before modifying:\n  `aws ce get-anomaly-monitors > \u002Ftmp\u002Fmonitors-backup-$(date +%s).json`\n  `aws ce get-anomaly-subscriptions > \u002Ftmp\u002Fsubscriptions-backup-$(date +%s).json`\n\n- **Before deploying auto-remediation Lambda**, test against a synthetic\n  anomaly event in non-production. Verify tagging, right-sizing, and\n  shutdown actions execute correctly.\n\n- **Before enabling Critical-severity auto-remediation**, verify the\n  tagging policy correctly identifies non-prod resources. A mistagged\n  production instance is treated as non-prod and shut down.\n\n- **For multi-account deployments**, verify the Lambda IAM role has\n  cross-account AssumeRole permissions for each linked account.\n\n## Appendix A — Monitor type comparison\n\nAppendix A monitor-type comparison table (service-level, linked-account, region, instance-type, all-services) moved verbatim to [references\u002Fcost-anomaly-monitor-types.md](references\u002Fcost-anomaly-monitor-types.md).\nLoad on demand when choosing a monitor type..\n\n## Appendix B — Decision tree\n\n```\nIs real-time cost protection required?\n├─ Yes → Cost Anomaly Detection alone is NOT sufficient.\n│        Add CloudWatch billing alarms + Cost Anomaly Detection.\n└─ No  → Single account or multi-account?\n        ├─ Single → Create service-level + account-level monitors.\n        └─ Multi  → Create Payer-level monitor + per-account routing.\n\nFor each monitor:\n  Auto-remediation required?\n  ├─ Yes → Reversible within 15 min?\n  │       ├─ Yes → Tested in non-prod? ── Yes → DEPLOY Lambda (Step 5)\n  │       │                                └── No → REVIEW_REQUIRED\n  │       └─ No  → REVIEW_REQUIRED (destructive; manual gate)\n  └─ No  → Notify-only (SNS + Slack). AUTOMATION_DEPLOYED.\n```\n\n## Recent AWS features (2024-2026)\n\nRecent AWS features (contribution analysis, feedback API GA, Budget Actions, multi-account routing context) moved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\nLoad on demand when auditing recent setups..\n\n## Expert heuristic: anomaly detection coverage gaps\n\nExpert heuristic deep dive (monitor-without-subscription rule, verification protocol table, 3-cycle pre-production validation, COVERAGE_STATUS \u002F VALIDATION_STATUS output fields) moved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\nLoad on demand before declaring the pipeline deployed..\n\n## References (load on demand)\n\n- [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — Step 0 expert knowledge, Steps 5\u002F7\u002F8\u002F9\u002F10 recipes (remediation Lambda, Payer monitor, Slack\u002FTeams, feedback, Cost Explorer), Recent AWS features, and the coverage-gap expert heuristic moved from SKILL.md.\n- [references\u002Fworked-examples.md](references\u002Fworked-examples.md) — the REVIEW_REQUIRED worked example moved from SKILL.md.\n- [references\u002Ferror-handling.md](references\u002Ferror-handling.md) — the Step 3 subscription error table moved from SKILL.md.\n- [references\u002Fbudgets-and-anomaly-integration.md](references\u002Fbudgets-and-anomaly-integration.md) — now also holds the Step 6 Budgets hard-limit CLI moved from SKILL.md.\n- [references\u002Fcost-anomaly-monitor-types.md](references\u002Fcost-anomaly-monitor-types.md) — now also holds the Appendix A monitor-type comparison moved from SKILL.md.\n\n## Domain\n\nAWS CloudOps \u002F FinOps Automation — Cost Anomaly Detection and Budgets.\n\n## AWS documentation\n\n- **AWS Cost Anomaly Detection** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fcost-management\u002Flatest\u002Fuserguide\u002Fad-acm.html\n- **AWS Budgets** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fcost-management\u002Flatest\u002Fuserguide\u002Fbudgets-managing-costs.html\n- **Cost Explorer API** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fcost-management\u002Flatest\u002Fuserguide\u002Fce-api.html\n- **Anomaly Feedback API** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fcost-management\u002Flatest\u002Fuserguide\u002Fanomaly-subscriptions.html\n- **Budget Actions** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fcost-management\u002Flatest\u002Fuserguide\u002Fbudgets-controls.html\n","# Cost Anomaly Detection Automator\n\n## Mindset\n\n**One-line takeaway:** cost anomaly automation is a four-stage pipeline —\n**detect** (Cost Anomaly Monitor uses ML on historical spend) → **alert**\n(anomaly subscription routes to SNS, email, or Lambda webhook) → **react**\n(severity-based routing: Critical = page, High = notify, Low = log) →\n**remediate** (Lambda auto-remediation: tag untagged resources, right-size,\nshutdown non-prod). A gap in ANY stage produces silent cost leakage.\n\n- **Detection** without **subscription** is invisible: the monitor\n  detects anomalies but no alert is emitted. This is the most common\n  misconfiguration — operators create the monitor and forget the\n  subscription.\n- **Cost Anomaly Detection and AWS Budgets are complementary, not\n  redundant.** Cost Anomaly Detection uses ML on historical spend patterns.\n  Budgets use static thresholds. Service-level monitors catch per-service\n  spikes; account-level monitors catch total spend. Use both.\n- **Severity routing is the operator's lever.** Critical anomalies page\n  the on-call; High anomalies notify a Slack channel; Low anomalies log\n  to a dashboard. Without severity routing, every anomaly pages — or\n  worse, none do because the team muted everything.\n\n## Quick navigation\n\n| You want to... | Go to |\n|---|---|\n| Create a service-level Cost Anomaly Monitor | Step 2 + Appendix A |\n| Decide monitor type (service vs linked-account vs dimension) | Step 1 + Step 2 |\n| Wire anomaly subscription with severity routing | Step 3 + Step 4 |\n| Build auto-remediation Lambda for cost spikes | Step 5 |\n| Integrate Budgets for hard limits | Step 6 |\n| Set up multi-account via Organizations Payer | Step 7 |\n| Add Slack or Teams webhook notifications | Step 8 |\n| Submit anomaly feedback (true\u002Ffalse positive) | Step 9 |\n| Analyze a detected anomaly via Cost Explorer | Step 10 |\n| Avoid common pitfall patterns | Anti-Patterns |\n| Recent features (contribution analysis, feedback) | Recent AWS features |\n\n## Critical rules at a glance (do NOT bury these)\n\n1. **A Cost Anomaly Monitor without a subscription detects anomalies\n   silently.** `create-anomaly-monitor` creates the detection engine;\n   `create-anomaly-subscription` creates the alert delivery. Separate\n   API calls. Operators frequently create the monitor and assume alerts\n   are wired. Always pair them and verify with\n   `get-anomaly-subscriptions`.\n2. **Cost Anomaly Detection needs at least 10 days of data to establish\n   a baseline.** A brand-new account or a newly enabled service has\n   insufficient history. The first 10 days are a warm-up period with\n   reduced sensitivity.\n3. **Budgets are static thresholds; Cost Anomaly Detection is dynamic\n   (ML-based).** Budgets catch \"we spent more than $X total.\" Anomaly\n   Detection catches \"EC2 spend on Tuesday is 3x the normal pattern.\"\n   Never substitute one for the other — use both.\n4. **Service-level and account-level monitors catch DIFFERENT\n   anomalies.** A service-level monitor on EC2 catches an EC2 spike even\n   if total account spend looks normal. An account-level monitor catches\n   total spend deviations regardless of which service caused them.\n   Deploy both for full coverage.\n5. **Anomaly feedback improves the ML model.** `provide-anomaly-feedback`\n   with `isTruePositive: true|false` trains the model to reduce false\n   positives over time. Without feedback, false positive rate stays flat.\n\n## Pre-flight: data requirements\n\n| Input | Source | Why |\n|---|---|---|\n| Account ID or Payer ID | `aws organizations list-accounts` | Scope of monitor |\n| Monitor type | Service, linked-account, or dimension-based | Detection granularity |\n| Target service(s) | `aws ce get-cost-and-usage --group-by Type=DIMENSION,Value=SERVICE` | For service-level monitors |\n| SNS topic ARN | `aws sns create-topic` | Alert delivery endpoint |\n| Lambda function ARN | `aws lambda create-function` | Auto-remediation endpoint |\n| Existing monitors | `aws ce get-anomaly-monitors` | Don't duplicate |\n| Existing subscriptions | `aws ce get-anomaly-subscriptions` | Don't overwrite blindly |\n| Existing budgets | `aws budgets describe-budgets --account-id \u003Cid>` | Check before creating new |\n| Slack\u002FTeams webhook URL | Incoming webhook config | Notification channel |\n\n**If the input is malformed** (missing account ID, ambiguous monitor\ntype), emit:\n\n```text\nANOMALY: \u003Creference>\nMONITOR: \u003Cmonitor-name>\nVERDICT: ERROR\nREASON: Cannot design anomaly pipeline — account ID and monitor type are required.\nGAP: Re-supply the account ID, desired monitor type, and target service or dimension.\n```\n\n## Process — Pipeline design (apply in order)\n\n### Step 0: Expert knowledge — non-obvious Cost Anomaly behaviors\n\nStep 0 expert knowledge (daily-not-real-time evaluation, 10-day ML warm-up, async monitor PENDING state, operator-defined severity thresholds, rootCauseService accuracy, SNS\u002Femail\u002FLambda targets, Budgets independence, per-anomaly feedback, dimension vs service monitors, Payer coverage) moved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\nLoad on demand before designing the pipeline..\n\n### Step 1: Classify the monitoring requirement\n\n| Requirement | Monitor type | Example |\n|---|---|---|\n| Catch total spend deviations | `DIMENSION` on `PAYER_ACCOUNT` | \"Alert if total monthly spend spikes\" |\n| Catch per-service spikes | `DIMENSION` on `SERVICE` | \"Alert if EC2 or S3 spend spikes\" |\n| Catch per-account spend (multi-account) | `DIMENSION` on `LINKED_ACCOUNT` | \"Alert if linked account 2222 spend spikes\" |\n| Catch per-region\u002Finstance-type spikes | `DIMENSION` on `REGION` or `INSTANCE_TYPE` | \"Alert if GPU instance spend spikes\" |\n| Broad ML-based detection across all services | `DIMENSION` on `SERVICE` (all values) | Default Coverage monitor |\n\nIf ambiguous, default to `DIMENSION` on `SERVICE` for the top 3 services\nby spend (query Cost Explorer to identify them).\n\n### Step 2: Create the Cost Anomaly Monitor\n\n```bash\n# Service-level monitor (EC2)\naws ce create-anomaly-monitor \\\n  --anomaly-monitor '{\n    \"MonitorName\": \"ec2-spend-anomaly-monitor\",\n    \"MonitorType\": \"DIMENSION\",\n    \"MonitorDimension\": \"SERVICE\",\n    \"MonitorSpecification\": \"{\\\"Dimensions\\\":{\\\"Key\\\":\\\"SERVICE\\\",\\\"Values\\\":[\\\"Amazon Elastic Compute Cloud - Compute\\\"],\\\"MatchOptions\\\":[\\\"EQUALS\\\"]}}\"\n  }'\n```\n\nLinked-account monitor:\n\n```bash\naws ce create-anomaly-monitor \\\n  --anomaly-monitor '{\n    \"MonitorName\": \"linked-account-2222-anomaly\",\n    \"MonitorType\": \"DIMENSION\",\n    \"MonitorDimension\": \"LINKED_ACCOUNT\",\n    \"MonitorSpecification\": \"{\\\"Dimensions\\\":{\\\"Key\\\":\\\"LINKED_ACCOUNT\\\",\\\"Values\\\":[\\\"222222222222\\\"],\\\"MatchOptions\\\":[\\\"EQUALS\\\"]}}\"\n  }'\n```\n\nVerify the monitor is ACTIVE before proceeding:\n\n```bash\naws ce get-anomaly-monitors \\\n  --monitor-arn-list \u003Cmonitor-arn> \\\n  --query 'AnomalyMonitors[0].[MonitorName,MonitorType,MonitorStatus]'\n```\n\nIf `MonitorStatus` is `PENDING`, wait and re-check. A subscription\nagainst a `PENDING` monitor silently fails to alert.\n\n### Step 3: Create the anomaly subscription with severity routing\n\nSeverity routing is achieved by creating multiple subscriptions with\ndifferent thresholds targeting different endpoints.\n\n```bash\n# Critical: threshold >= 50% -> SNS topic that pages on-call\naws ce create-anomaly-subscription \\\n  --anomaly-subscription '{\n    \"SubscriptionName\": \"critical-cost-anomaly\",\n    \"Threshold\": 50.0,\n    \"Frequency\": \"IMMEDIATE\",\n    \"MonitorArn\": \"\u003Cmonitor-arn>\",\n    \"Subscribers\": [\n      {\"Address\": \"arn:aws:sns:us-east-1:111111111111:critical-cost-alerts\", \"Type\": \"SNS\"}\n    ]\n  }'\n\n# High: threshold >= 20% -> SNS topic that notifies Slack\naws ce create-anomaly-subscription \\\n  --anomaly-subscription '{\n    \"SubscriptionName\": \"high-cost-anomaly\",\n    \"Threshold\": 20.0,\n    \"Frequency\": \"DAILY\",\n    \"MonitorArn\": \"\u003Cmonitor-arn>\",\n    \"Subscribers\": [\n      {\"Address\": \"arn:aws:sns:us-east-1:111111111111:high-cost-alerts\", \"Type\": \"SNS\"}\n    ]\n  }'\n```\n\n**Severity threshold mapping (recommended starting point):**\n\n| Severity | Threshold | Frequency | Routing |\n|---|---|---|---|\n| Critical | >= 50% deviation | IMMEDIATE | Page on-call (PagerDuty via SNS) |\n| High | 20-50% deviation | DAILY | Slack\u002FTeams notification via SNS → Lambda |\n| Low | \u003C 20% deviation | WEEKLY | Log to dashboard; no active notification |\n\nStep 3 subscription-creation error table (ValidationException on PENDING monitor, AccessDeniedException, LimitExceededException, no-alerts SNS policy) moved verbatim to [references\u002Ferror-handling.md](references\u002Ferror-handling.md).\nLoad on demand when the subscription API fails..\n\n### Step 4: Wire SNS fan-out for multi-channel routing\n\nSNS is the recommended subscriber type — it fans out to Lambda, email,\nSQS, and HTTPS webhooks from a single subscription.\n\n```bash\naws sns create-topic --name critical-cost-alerts\n\n# Lambda subscriber for severity routing and Slack formatting\naws sns subscribe \\\n  --topic-arn arn:aws:sns:us-east-1:111111111111:critical-cost-alerts \\\n  --protocol lambda \\\n  --notification-endpoint arn:aws:lambda:us-east-1:111111111111:function:cost-anomaly-router\n```\n\nSNS topic policy — allow Cost Anomaly Detection to publish:\n\n```json\n{\n  \"Version\": \"2012-10-17\",\n  \"Statement\": [{\n    \"Effect\": \"Allow\",\n    \"Principal\": {\"Service\": \"events.costanomaly.amazonaws.com\"},\n    \"Action\": \"sns:Publish\",\n    \"Resource\": \"arn:aws:sns:us-east-1:111111111111:critical-cost-alerts\"\n  }]\n}\n```\n\nA missing topic policy entry for `events.costanomaly.amazonaws.com` is\nthe single most common cause of \"subscription created but no alerts\nreceived.\"\n\n### Step 5: Build the auto-remediation Lambda\n\nThe Lambda receives the SNS message containing the anomaly JSON and\nperforms remediation based on the root cause.\n\nStep 5 auto-remediation Lambda (full Python: severity from maxImpact, EC2 tag-and-stop remediation, Slack notify, auto feedback) moved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\nLoad on demand when building the remediation function..\n\n**Decision rule:** default to **notify-only** unless ALL of the\nfollowing are true: (a) the remediation is reversible within 15\nminutes, (b) the Lambda has been tested in non-production, (c) the\nremediation is scoped to non-prod resources (or has an explicit\nproduction-impact assessment), (d) the action is logged to CloudTrail.\n\n### Step 6: Integrate AWS Budgets for hard limits\n\nBudgets complement anomaly detection with static thresholds.\n\nStep 6 create-budget CLI (ACTUAL 80% + FORECASTED 100% notifications with SNS subscribers) moved verbatim to [references\u002Fbudgets-and-anomaly-integration.md](references\u002Fbudgets-and-anomaly-integration.md).\nLoad on demand when wiring Budgets hard limits..\n\n| Dimension | Cost Anomaly Detection | AWS Budgets |\n|---|---|---|\n| Detection method | ML on historical patterns | Static threshold |\n| Sensitivity | Dynamic (adapts to trends) | Fixed (operator-defined) |\n| Best for | Unexpected pattern deviations | Hard spend limits |\n| False positive rate | Decreases with feedback | Zero (threshold is exact) |\n\n### Step 7: Multi-account via Organizations Payer\n\nStep 7 Payer-level monitor CLI and the Payer-account constraint + per-linked-account Lambda routing moved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\nLoad on demand for multi-account coverage..\n\n### Step 8: Slack and Teams webhook notifications\n\nThe Lambda router formats and sends notifications. Configure the webhook\nURL as a Lambda environment variable.\n\nStep 8 Slack message formatter (severity-colored attachments) and Teams Adaptive Card note moved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\nLoad on demand when wiring webhooks..\n\n### Step 9: Submit anomaly feedback\n\nStep 9 provide-anomaly-feedback CLI and automated feedback rules (false-positive service list, impact threshold) moved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\nLoad on demand when closing the feedback loop..\n\n### Step 10: Analyze anomalies via Cost Explorer\n\nStep 10 Cost Explorer breakdown queries (by service, by usage type for the root-cause service) and contribution-analysis confirmation moved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\nLoad on demand when deep-diving a detected anomaly..\n\n## Output format\n\n```text\nANOMALY: \u003Creference>\nMONITOR:\n  - Name: \u003Cmonitor-name>\n  - Type: DIMENSION (SERVICE | LINKED_ACCOUNT | REGION)\n  - Status: ACTIVE | PENDING\n  - Scope: \u003Cservice or account coverage>\nSUBSCRIPTION:\n  - Severity routing: Critical (>=50%), High (20-50%), Low (\u003C20%)\n  - Endpoints: SNS topic(s), email(s), Lambda ARN(s)\n  - Frequency: IMMEDIATE | DAILY | WEEKLY\nROUTING:\n  - Critical: \u003Con-call page mechanism>\n  - High: \u003CSlack\u002FTeams notification>\n  - Low: \u003Cdashboard log>\nREMEDIATION:\n  - Actions: \u003Ctag untagged, right-size, shutdown non-prod, notify-only>\n  - Lambda: \u003Cfunction ARN or \"NOT WIRED\">\n  - Scope: \u003Cproduction | non-production | all>\n  - Safety: \u003Cdry-run, approval gate, production-impact assessment>\nAUDIT:\n  - Budgets: \u003Cbudget name(s) and threshold(s)>\n  - Feedback: \u003Cauto-feedback rules>\n  - Baseline: \u003Ctrailing 90-day average>\nVERDICT: AUTOMATION_DEPLOYED | REVIEW_REQUIRED\nGAP: \u003Cif REVIEW_REQUIRED, the specific missing piece>\nTEMPLATE: \u003CCLI snippet for the monitor + subscription>\n```\n\n### Worked example — AUTOMATION_DEPLOYED, EC2 service-level monitor\n\n```text\nANOMALY: ec2-spend-anomaly\nMONITOR:\n  - Name: ec2-spend-anomaly-monitor\n  - Type: DIMENSION (SERVICE=Amazon Elastic Compute Cloud - Compute)\n  - Status: ACTIVE\n  - Scope: EC2 spend in account 111111111111\nSUBSCRIPTION:\n  - Severity routing: Critical (>=50%), High (20-50%), Low (\u003C20%)\n  - Endpoints: SNS arn:aws:sns:us-east-1:111111111111:critical-cost-alerts\n  - Frequency: IMMEDIATE for Critical, DAILY for High\nROUTING:\n  - Critical: SNS → Lambda → PagerDuty + Slack #finops-critical\n  - High: SNS → Lambda → Slack #finops-alerts\n  - Low: CloudWatch dashboard log\nREMEDIATION:\n  - Actions: tag untagged EC2 instances; shutdown non-prod if Critical\n  - Lambda: arn:aws:lambda:us-east-1:111111111111:function:cost-anomaly-router\n  - Scope: non-production only (production = notify-only)\n  - Safety: dry-run tagging; production-impact assessment before shutdown\nAUDIT:\n  - Budgets: monthly-cost-budget ($10K, 80% actual, 100% forecast)\n  - Feedback: auto-true-positive for impact >= $200\n  - Baseline: trailing 90-day EC2 average $2,340\u002Fday\nVERDICT: AUTOMATION_DEPLOYED\nGAP: None\nTEMPLATE:\n  aws ce create-anomaly-monitor --anomaly-monitor '{\"MonitorName\":\"ec2-spend-anomaly-monitor\",\"MonitorType\":\"DIMENSION\",\"MonitorDimension\":\"SERVICE\",\"MonitorSpecification\":\"{\\\"Dimensions\\\":{\\\"Key\\\":\\\"SERVICE\\\",\\\"Values\\\":[\\\"Amazon Elastic Compute Cloud - Compute\\\"],\\\"MatchOptions\\\":[\\\"EQUALS\\\"]}}\"}'\n  aws ce create-anomaly-subscription --anomaly-subscription '{\"SubscriptionName\":\"critical-cost-anomaly\",\"Threshold\":50.0,\"Frequency\":\"IMMEDIATE\",\"MonitorArn\":\"\u003Cmonitor-arn>\",\"Subscribers\":[{\"Address\":\"arn:aws:sns:us-east-1:111111111111:critical-cost-alerts\",\"Type\":\"SNS\"}]}'\n```\n\n### Worked example — REVIEW_REQUIRED, monitor without subscription\n\nWorked example — REVIEW_REQUIRED, monitor without subscription (NOT-WIRED routing\u002Fremediation\u002Faudit rows) moved verbatim to [references\u002Fworked-examples.md](references\u002Fworked-examples.md).\nLoad on demand for the REVIEW_REQUIRED output shape..\n\n## Anti-Patterns — NEVER do these things\n\n- NEVER create a Cost Anomaly Monitor without a corresponding anomaly\n  subscription. The monitor detects; the subscription delivers. Without\n  the subscription, anomalies are detected silently — operators believe\n  coverage exists but receive zero alerts.\n\n- NEVER substitute AWS Budgets for Cost Anomaly Detection or vice versa.\n  Budgets use static thresholds; Anomaly Detection uses ML on patterns.\n  They catch different anomaly classes. Use both.\n\n- NEVER expect real-time anomaly detection. Cost Anomaly Detection\n  evaluates daily data (8-24 hour lag). For real-time protection, pair\n  with CloudWatch billing alarms.\n\n- NEVER configure auto-remediation Lambda for production resources\n  without an impact assessment. A Critical anomaly that triggers\n  `stop_instances` on production EC2 causes an immediate outage. Scope\n  auto-remediation to non-prod by default.\n\n- NEVER omit the SNS topic policy entry for\n  `events.costanomaly.amazonaws.com`. Without this principal, Cost\n  Anomaly Detection cannot publish to the SNS topic. The subscription\n  appears correct but no alerts are ever delivered.\n\n- NEVER assume the `rootCauseService` field is always accurate. It is\n  ML-inferred. Cross-reference with Cost Explorer contribution analysis\n  before acting on auto-remediation.\n\n- NEVER skip anomaly feedback submission. Without feedback, the ML\n  model never improves its false-positive rate. Alert fatigue increases\n  and operators mute all anomaly alerts.\n\n- NEVER create a dimension-based monitor with a dimension value that\n  does not exist in Cost Explorer billing data. The monitor is created\n  successfully but never detects anomalies (zero cost data). Always\n  verify the dimension value via `get-cost-and-usage` first.\n\n- NEVER deploy a single subscription for all severity levels. A\n  threshold of 10% floods the on-call with low-impact anomalies. Create\n  separate subscriptions per severity tier.\n\n- NEVER assume a Payer-level monitor provides per-linked-account alert\n  routing. The Lambda router must extract `accountId` from the payload\n  and route accordingly.\n\n- NEVER set the auto-remediation Lambda timeout below 60 seconds.\n  Tagging resources and calling EC2 APIs take time. A 3-second default\n  timeout produces partial remediation with no retry.\n\n- NEVER forget to verify the monitor's `monitorStatus` is `ACTIVE`\n  before creating subscriptions. A subscription against a `PENDING`\n  monitor silently fails.\n\n- NEVER omit the Lambda DLQ for the auto-remediation Lambda. Failed\n  invocations are lost without a DLQ. Configure SQS DLQ and alarm on\n  queue depth.\n\n- NEVER use `Frequency: IMMEDIATE` for all severity tiers. Reserve\n  `IMMEDIATE` for Critical; use `DAILY` for High and `WEEKLY` for Low.\n\n- NEVER create Budgets without verifying existing budgets first. AWS\n  Budgets has per-account limits. Always call `describe-budgets` before\n  `create-budget`.\n\n## Pre-flight safety checks (run before applying any pipeline CLI)\n\n- **MANDATORY CONFIRMATION GATE.** Before any state-changing operation,\n  emit: `CONFIRM: About to \u003Caction> for account \u003Caccount>. This affects\n  \u003Cconsequence>. Proceed? (yes\u002Fno)`\n\n- **Back up the current configuration** before modifying:\n  `aws ce get-anomaly-monitors > \u002Ftmp\u002Fmonitors-backup-$(date +%s).json`\n  `aws ce get-anomaly-subscriptions > \u002Ftmp\u002Fsubscriptions-backup-$(date +%s).json`\n\n- **Before deploying auto-remediation Lambda**, test against a synthetic\n  anomaly event in non-production. Verify tagging, right-sizing, and\n  shutdown actions execute correctly.\n\n- **Before enabling Critical-severity auto-remediation**, verify the\n  tagging policy correctly identifies non-prod resources. A mistagged\n  production instance is treated as non-prod and shut down.\n\n- **For multi-account deployments**, verify the Lambda IAM role has\n  cross-account AssumeRole permissions for each linked account.\n\n## Appendix A — Monitor type comparison\n\nAppendix A monitor-type comparison table (service-level, linked-account, region, instance-type, all-services) moved verbatim to [references\u002Fcost-anomaly-monitor-types.md](references\u002Fcost-anomaly-monitor-types.md).\nLoad on demand when choosing a monitor type..\n\n## Appendix B — Decision tree\n\n```\nIs real-time cost protection required?\n├─ Yes → Cost Anomaly Detection alone is NOT sufficient.\n│        Add CloudWatch billing alarms + Cost Anomaly Detection.\n└─ No  → Single account or multi-account?\n        ├─ Single → Create service-level + account-level monitors.\n        └─ Multi  → Create Payer-level monitor + per-account routing.\n\nFor each monitor:\n  Auto-remediation required?\n  ├─ Yes → Reversible within 15 min?\n  │       ├─ Yes → Tested in non-prod? ── Yes → DEPLOY Lambda (Step 5)\n  │       │                                └── No → REVIEW_REQUIRED\n  │       └─ No  → REVIEW_REQUIRED (destructive; manual gate)\n  └─ No  → Notify-only (SNS + Slack). AUTOMATION_DEPLOYED.\n```\n\n## Recent AWS features (2024-2026)\n\nRecent AWS features (contribution analysis, feedback API GA, Budget Actions, multi-account routing context) moved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\nLoad on demand when auditing recent setups..\n\n## Expert heuristic: anomaly detection coverage gaps\n\nExpert heuristic deep dive (monitor-without-subscription rule, verification protocol table, 3-cycle pre-production validation, COVERAGE_STATUS \u002F VALIDATION_STATUS output fields) moved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\nLoad on demand before declaring the pipeline deployed..\n\n## References (load on demand)\n\n- [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — Step 0 expert knowledge, Steps 5\u002F7\u002F8\u002F9\u002F10 recipes (remediation Lambda, Payer monitor, Slack\u002FTeams, feedback, Cost Explorer), Recent AWS features, and the coverage-gap expert heuristic moved from SKILL.md.\n- [references\u002Fworked-examples.md](references\u002Fworked-examples.md) — the REVIEW_REQUIRED worked example moved from SKILL.md.\n- [references\u002Ferror-handling.md](references\u002Ferror-handling.md) — the Step 3 subscription error table moved from SKILL.md.\n- [references\u002Fbudgets-and-anomaly-integration.md](references\u002Fbudgets-and-anomaly-integration.md) — now also holds the Step 6 Budgets hard-limit CLI moved from SKILL.md.\n- [references\u002Fcost-anomaly-monitor-types.md](references\u002Fcost-anomaly-monitor-types.md) — now also holds the Appendix A monitor-type comparison moved from SKILL.md.\n\n## Domain\n\nAWS CloudOps \u002F FinOps Automation — Cost Anomaly Detection and Budgets.\n\n## AWS documentation\n\n- **AWS Cost Anomaly Detection** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fcost-management\u002Flatest\u002Fuserguide\u002Fad-acm.html\n- **AWS Budgets** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fcost-management\u002Flatest\u002Fuserguide\u002Fbudgets-managing-costs.html\n- **Cost Explorer API** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fcost-management\u002Flatest\u002Fuserguide\u002Fce-api.html\n- **Anomaly Feedback API** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fcost-management\u002Flatest\u002Fuserguide\u002Fanomaly-subscriptions.html\n- **Budget Actions** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fcost-management\u002Flatest\u002Fuserguide\u002Fbudgets-controls.html\n",{"name":5,"license":15,"metadata":24,"description":7,"compatibility":42},{"tags":25,"phase":26,"author":27,"domain":28,"family":29,"version":30,"keywords":31,"task_type":32,"complexity":33,"entry_point":34,"skill_class":35,"when_to_use":36,"requires_llm":37,"verdict_shape":38,"lifecycle_status":39,"invocation_schema":40,"supports_pipeline":37,"activation_triggers":41},"aws-cost-anomaly-detection, aws-budgets, cost-explorer, finops, auto-remediation, anomaly-detection, automate","4","Jacky Chan — AWS Community Builder","aws-cloudops","FinOps","0.1.0","AWS Cost Anomaly Detection, Cost Anomaly Monitor, Anomaly Subscription, AWS Budgets, Cost Explorer, contribution analysis, service-level monitor, linked account monitor, Organizations Payer, severity routing, auto-remediation Lambda, tag untagged resources, Slack webhook, anomaly feedback, FinOps","automate","high","false","capability","Building cost anomaly detection automation, creating Cost Anomaly Monitors (service, linked-account, or dimension-based), wiring severity-routed alert subscriptions, integrating Budgets hard-limits with anomaly detection, deploying auto-remediation Lambda for spend spikes, setting up multi-account coverage via Organizations Payer, or adding Slack\u002FTeams webhook notifications for cost anomalies.","true","AUTOMATION_DEPLOYED | REVIEW_REQUIRED","active","Input: either (a) a cost anomaly detection requirement (\"alert on EC2 spend spikes\", \"auto-tag untagged resources causing cost anomalies\"), OR (b) an existing Cost Anomaly Monitor configuration to extend with severity routing or auto-remediation. Output: deterministic ANOMALY block per monitor — MONITOR\u002FSUBSCRIPTION\u002FROUTING\u002FREMEDIATION\u002FAUDIT\u002F VERDICT — where VERDICT is AUTOMATION_DEPLOYED (pipeline ready) or REVIEW_REQUIRED (specific gap cited).","automate cost anomaly detection, create Cost Anomaly Monitor, create-anomaly-subscription, severity routing cost anomaly, Budgets integration anomaly, auto-remediation cost spike, tag untagged resources Lambda, Organizations Payer anomaly, Slack webhook cost alert, anomaly feedback true positive","Agent runtime that reads SKILL.md (Claude Code, Cursor, Windsurf, Codex, Gemini). No AWS CLI required for offline workflow design. Live deployment uses aws ce create-anomaly-monitor, create-anomaly-subscription, get-anomalies, provide-anomaly-feedback, aws budgets create-budget, and aws ce get-cost-and-usage — AWS CLI v2, SSO or key-based credentials.","main","eeace51bd5dd1db2030729d83eeab988861553aa","skills\u002Fcost-anomaly-detection-automator",0,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills","https:\u002F\u002Fgithub.com\u002Fjhkchan","CTO & Co-Founder @Beever-AI  & @votee. CAISP. AWS Community Builder. Organizer@GDGCloudHK. MongoDB Champion. Technopreneur + Infornographer.","2026-09-24 08:54:10",{"source":8,"skillName":5,"commands":52,"prompt":62,"zipAvailable":63},[53,56,59],{"tool":54,"command":55},"npx","npx skills add jhkchan\u002Faws-agent-skills --skill cost-anomaly-detection-automator",{"tool":57,"command":58},"bunx","bunx skills add jhkchan\u002Faws-agent-skills --skill cost-anomaly-detection-automator",{"tool":60,"command":61},"pnpm","pnpm dlx skills add jhkchan\u002Faws-agent-skills --skill cost-anomaly-detection-automator","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcost-anomaly-detection-automator\u002FSKILL.md",true,[65,71,75,79,83,87,91,95,99,103,107,111,115,119,123,127,131,135,139,143],{"path":66,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":69,"sourceHtmlUrl":70},"eval\u002Ftest-cases.yaml","REFERENCE","参考文档",6427,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcost-anomaly-detection-automator\u002Feval\u002Ftest-cases.yaml",{"path":72,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":73,"sourceHtmlUrl":74},"evals\u002Fbaselines\u002Fauto-remediation-prod-impact.md",778,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcost-anomaly-detection-automator\u002Fevals\u002Fbaselines\u002Fauto-remediation-prod-impact.md",{"path":76,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":77,"sourceHtmlUrl":78},"evals\u002Fbaselines\u002Fbudgets-integration-hard-limit.md",746,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcost-anomaly-detection-automator\u002Fevals\u002Fbaselines\u002Fbudgets-integration-hard-limit.md",{"path":80,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":81,"sourceHtmlUrl":82},"evals\u002Fbaselines\u002Forg-payer-coverage-gap.md",752,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcost-anomaly-detection-automator\u002Fevals\u002Fbaselines\u002Forg-payer-coverage-gap.md",{"path":84,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":85,"sourceHtmlUrl":86},"evals\u002Fbaselines\u002Fservice-monitor-auto.md",899,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcost-anomaly-detection-automator\u002Fevals\u002Fbaselines\u002Fservice-monitor-auto.md",{"path":88,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":89,"sourceHtmlUrl":90},"evals\u002Fbaselines\u002Fseverity-routing-lambda.md",780,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcost-anomaly-detection-automator\u002Fevals\u002Fbaselines\u002Fseverity-routing-lambda.md",{"path":92,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":93,"sourceHtmlUrl":94},"evals\u002Feval_config.yaml",1770,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcost-anomaly-detection-automator\u002Fevals\u002Feval_config.yaml",{"path":96,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":97,"sourceHtmlUrl":98},"evals\u002Fevals.json",4349,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcost-anomaly-detection-automator\u002Fevals\u002Fevals.json",{"path":100,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":101,"sourceHtmlUrl":102},"evals\u002Fprompts\u002Fauto-remediation-prod-impact.md",770,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcost-anomaly-detection-automator\u002Fevals\u002Fprompts\u002Fauto-remediation-prod-impact.md",{"path":104,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":105,"sourceHtmlUrl":106},"evals\u002Fprompts\u002Fbudgets-integration-hard-limit.md",848,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcost-anomaly-detection-automator\u002Fevals\u002Fprompts\u002Fbudgets-integration-hard-limit.md",{"path":108,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":109,"sourceHtmlUrl":110},"evals\u002Fprompts\u002Forg-payer-coverage-gap.md",689,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcost-anomaly-detection-automator\u002Fevals\u002Fprompts\u002Forg-payer-coverage-gap.md",{"path":112,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":113,"sourceHtmlUrl":114},"evals\u002Fprompts\u002Fservice-monitor-auto.md",730,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcost-anomaly-detection-automator\u002Fevals\u002Fprompts\u002Fservice-monitor-auto.md",{"path":116,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":117,"sourceHtmlUrl":118},"evals\u002Fprompts\u002Fseverity-routing-lambda.md",880,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcost-anomaly-detection-automator\u002Fevals\u002Fprompts\u002Fseverity-routing-lambda.md",{"path":120,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":121,"sourceHtmlUrl":122},"examples\u002Fend-to-end.md",7419,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcost-anomaly-detection-automator\u002Fexamples\u002Fend-to-end.md",{"path":124,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":125,"sourceHtmlUrl":126},"references\u002Fadvanced-patterns.md",11580,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcost-anomaly-detection-automator\u002Freferences\u002Fadvanced-patterns.md",{"path":128,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":129,"sourceHtmlUrl":130},"references\u002Fbudgets-and-anomaly-integration.md",8886,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcost-anomaly-detection-automator\u002Freferences\u002Fbudgets-and-anomaly-integration.md",{"path":132,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":133,"sourceHtmlUrl":134},"references\u002Fcost-anomaly-monitor-types.md",5250,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcost-anomaly-detection-automator\u002Freferences\u002Fcost-anomaly-monitor-types.md",{"path":136,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":137,"sourceHtmlUrl":138},"references\u002Ferror-handling.md",732,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcost-anomaly-detection-automator\u002Freferences\u002Ferror-handling.md",{"path":140,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":141,"sourceHtmlUrl":142},"references\u002Fworked-examples.md",1048,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcost-anomaly-detection-automator\u002Freferences\u002Fworked-examples.md",{"path":144,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":145,"sourceHtmlUrl":146},"skill.usf.yaml",4655,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcost-anomaly-detection-automator\u002Fskill.usf.yaml",[148,155,162,169,176,183],{"skillNo":149,"name":150,"nameZh":6,"description":151,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":152,"categories":153,"keywords":154,"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":156,"name":157,"nameZh":6,"description":158,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":159,"categories":160,"keywords":161,"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":163,"name":164,"nameZh":6,"description":165,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":166,"categories":167,"keywords":168,"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":170,"name":171,"nameZh":6,"description":172,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":173,"categories":174,"keywords":175,"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":177,"name":178,"nameZh":6,"description":179,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":180,"categories":181,"keywords":182,"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":184,"name":185,"nameZh":6,"description":186,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":187,"categories":188,"keywords":189,"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",[],[]]