← Back to Skills Marketplace
chengcecho

AWS Patrol

by chengcecho · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ⚠ pending
41
Downloads
0
Stars
0
Active Installs
2
Versions
Install in OpenClaw
/install aws-patrol
Description
Automated AWS infrastructure patrol — collects EC2/RDS/ELB metrics, security posture (IAM MFA, SG, EBS encryption, S3), cost analysis (SP/RI coverage & utili...
README (SKILL.md)

AWS Patrol

Automated AWS infrastructure monitoring, security audit, and cost analysis with visual report generation.

Prerequisites

  • Python 3.8+ with boto3
  • AWS credentials configured (profile or env vars)
  • Node.js + Puppeteer (for screenshot generation)
  • Required AWS permissions: ReadOnlyAccess (EC2, RDS, ELB, CloudWatch, IAM, S3, Cost Explorer, Savings Plans, Health, Pinpoint SMS)

Configuration (Environment Variables)

Variable Default Description
AWS_PATROL_PROFILE AWS_PROFILE or default AWS profile name
AWS_PATROL_REGIONS us-west-2,eu-west-2,ap-southeast-1 Comma-separated regions
AWS_PATROL_OUTPUT Current directory Output directory for JSON/HTML/PNG

Workflow

1. Collect Resource Metrics

python3 scripts/patrol.py

Outputs aws-patrol-detail.json with:

  • EC2: CPU, network, status checks (alerts if CPU>80% or status check failed)
  • RDS: CPU, memory, connections, storage, IOPS (alerts if CPU>80%, low memory, low storage)
  • ELB: target group health, unhealthy targets
  • CloudWatch alarms in ALARM state
  • AWS Health events (last 7 days)
  • SMS/Pinpoint sender registration status

2. Collect Security & Cost Data

python3 scripts/patrol-security-cost.py

Outputs aws-security-cost.json with:

  • Security: IAM users without MFA, old access keys (>90d), open security groups (0.0.0.0/0 on sensitive ports), unencrypted EBS, public S3 buckets
  • Cost: 30-day total & daily trend, SP utilization & coverage (7-day daily), RDS/ElastiCache RI coverage, active SPs & RIs, waste detection (stopped instances, unattached volumes, unused EIPs, old snapshots, low-CPU instances)

3. Generate Visual Report

python3 scripts/gen-report.py '\x3CJSON>'

Accepts a JSON argument with fields:

  • date, weekday, ec2Count, rdsCount, elbCount
  • costTotal, costDaily, unattachedVol, unusedEip, lowCpu, oldSnap
  • spUtilPct, spCovPct, rdsRiPct, ecRiPct
  • noMfa, unencEbs, openSg, oldKeys, s3Risk
  • highCpu (array: {name, cpu, type, level})
  • spRiDetails (string summary)
  • health (array: {type, title, desc})
  • sms (array: {name, status, level})
  • actions (array: {date, level, title, desc, daysLeft, daysLevel})

Outputs daily-report.html.

4. Screenshot & Deliver

# Start HTTP server
python3 -m http.server 18923 &
# Screenshot
node -e "const p=require('puppeteer');(async()=>{const b=await p.launch({headless:'new',args:['--no-sandbox']});const pg=await b.newPage();await pg.setViewport({width:520,height:800,deviceScaleFactor:2});await pg.goto('http://localhost:18923/daily-report.html',{waitUntil:'networkidle0'});await pg.screenshot({path:'daily-report.png',fullPage:true});await b.close()})()"
# Stop server
kill %1

Send daily-report.png via messaging with a brief summary.

Scheduling (Cron Example)

Set up a daily 9:00 AM patrol via OpenClaw cron (systemEvent → main session):

每天 9:00 运行 aws-patrol 巡检流程,采集数据 → 生成报告 → 截图推送

Anomaly Investigation

When high CPU, Health alerts, or SMS issues are detected, don't just report numbers — investigate root cause (check CloudWatch trends, recent deployments, process-level metrics) and include analysis in the report.

How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install aws-patrol
  3. After installation, invoke the skill by name or use /aws-patrol
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.1
Initial release — Automated AWS infrastructure patrol, security audit, cost analysis, and reporting. - Switched skill focus from 3D traffic monitoring (skyroute) to AWS infrastructure monitoring and reporting (aws-patrol). - Added scripts to collect resource metrics, security/cost data, generate visual HTML reports, and create screenshots. - New documentation covers automated data collection, report generation, and recommended scheduling for periodic AWS patrols. - Includes support for detecting high resource usage, underutilized resources, security risks, and cost inefficiencies. - Output is a shareable HTML and PNG report suitable for messaging and daily AWS health checks.
v1.0.0
Initial release of SkyRoute: a 3D globe visualization dashboard for AWS global traffic. - Visualizes real-time global connections to AWS regions with latency-based color arcs. - Displays top CloudFront edge nodes and key metrics like P95/P99 latency, error rate, RPS, and active connections. - Features alert mode for error spikes, sparkline trends for metrics history, and live country mapping (including Chinese names). - Self-contained HTML/WebGL dashboard; works with mock or real connection data via simple integration. - Easy deployment as a static file or dashboard embed; no backend required for core visualization.
Metadata
Slug aws-patrol
Version 1.0.1
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 2
Frequently Asked Questions

What is AWS Patrol?

Automated AWS infrastructure patrol — collects EC2/RDS/ELB metrics, security posture (IAM MFA, SG, EBS encryption, S3), cost analysis (SP/RI coverage & utili... It is an AI Agent Skill for Claude Code / OpenClaw, with 41 downloads so far.

How do I install AWS Patrol?

Run "/install aws-patrol" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is AWS Patrol free?

Yes, AWS Patrol is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does AWS Patrol support?

AWS Patrol is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created AWS Patrol?

It is built and maintained by chengcecho (@chengcecho); the current version is v1.0.1.

💬 Comments