Install
openclaw skills install aws-patrolAutomated AWS infrastructure patrol — collects EC2/RDS/ELB metrics, security posture (IAM MFA, SG, EBS encryption, S3), cost analysis (SP/RI coverage & utilization), Health events, and SMS registration status. Generates a visual HTML report card with Puppeteer screenshot for messaging delivery. Use when you need daily/periodic AWS monitoring, cost optimization checks, security audits, or automated reporting on AWS infrastructure health.
openclaw skills install aws-patrolAutomated AWS infrastructure monitoring, security audit, and cost analysis with visual report generation.
boto3| 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 |
python3 scripts/patrol.py
Outputs aws-patrol-detail.json with:
python3 scripts/patrol-security-cost.py
Outputs aws-security-cost.json with:
python3 scripts/gen-report.py '<JSON>'
Accepts a JSON argument with fields:
date, weekday, ec2Count, rdsCount, elbCountcostTotal, costDaily, unattachedVol, unusedEip, lowCpu, oldSnapspUtilPct, spCovPct, rdsRiPct, ecRiPctnoMfa, unencEbs, openSg, oldKeys, s3RiskhighCpu (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.
# 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.
Set up a daily 9:00 AM patrol via OpenClaw cron (systemEvent → main session):
每天 9:00 运行 aws-patrol 巡检流程,采集数据 → 生成报告 → 截图推送
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.