sre-ec2-health-check

Diagnose EC2 instance health using CloudWatch metrics, status checks, and CloudTrail events.

Updated Apr 5, 2026
One-click install
npx skills add https://github.com/schoolofdevops/401 --skill sre-ec2-health-check-schoolofdevops
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sre-ec2-health-check
Source: https://github.com/schoolofdevops/401/tree/main/skills/sre-ec2-health-check
Command: npx skills add https://github.com/schoolofdevops/401 --skill sre-ec2-health-check-schoolofdevops

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When a CloudWatch alarm fires for an EC2 instance or an instance becomes unreachable, on-call engineers need a structured, read-only diagnostic workflow to determine whether the fault is hardware, OS-level, CPU saturation, or network isolation before escalating. ## Core Features & Use Cases - Six-step data collection: Gathers instance status, CPU utilization, network I/O, disk I/O, CloudTrail events, and active CloudWatch alarms via AWS CLI. - Decision-tree diagnosis: Applies explicit branching logic to classify issues as AWS infrastructure faults, OS-level faults, CPU saturation, network isolation, or no active issue. - Escalation and safety guardrails: Defines exactly what evidence to include in escalation handoffs and prohibits reboots, security group changes, or instance termination without approval. - Use Case: A CloudWatch ec2-cpu-high alarm fires at 2 AM. Run this skill to collect all metrics, determine whether a CloudTrail maintenance event explains the spike, and produce a complete escalation package for the on-call engineer. ## Quick Start Ask the AI to run an EC2 health check on instance i-0123456789abcdef0 in us-east-1 and diagnose why the CPU alarm fired.

Frequently Asked Questions about sre-ec2-health-check

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I diagnose an EC2 instance that is unreachable?

Run describe-instance-status to check InstanceStatus and SystemStatus, then review NetworkIn CloudWatch metrics for drops to zero and CloudTrail events for recent security group or attribute changes. The decision tree classifies the fault as AWS infrastructure, OS-level, or network isolation.

How to investigate a CloudWatch CPU alarm on EC2?

Query CPUUtilization with get-metric-statistics over the last 30 minutes using 5-minute periods. If the maximum exceeds 95% for two consecutive periods without a matching CloudTrail maintenance event, escalate with the CPU readings and event history.

What IAM permissions are needed for EC2 health checks?

Read-only permissions suffice: ec2:DescribeInstances, ec2:DescribeInstanceStatus, cloudwatch:GetMetricStatistics, cloudwatch:DescribeAlarmsForMetric, and cloudtrail:LookupEvents. No write or modify permissions are required since the workflow never changes infrastructure.

Can this skill reboot or stop an EC2 instance?

No. The skill is strictly read-only and never reboots, stops, or terminates instances. It recommends a reboot for OS-level faults but requires explicit approval from the on-call engineer, who executes the action separately.

Does the EC2 health check work without live AWS access?

Yes. Set HERMES_LAB_MODE=mock and add the course/infrastructure/wrappers directory to PATH so mock AWS CLI wrappers return simulated outputs marked with a [MOCK MODE] banner for offline lab practice.

When should I not use this EC2 diagnostic workflow?

Avoid it for general performance tuning, capacity planning, cost investigation, or application-level debugging. It is scoped to infrastructure-layer incident response triggered by active alerts, not routine monitoring or log analysis.