Skip to main content
subagent GitHub Copilot official · GitHub

AWS Incident Triage — GitHub Copilot subagent: how to install

Drives structured AWS incident investigations from CloudWatch alarms to root-cause hypotheses using metrics, logs, and traces without touching live infrastructure.

Install into GitHub Copilot · Manually: put the files in place All methods and platforms ↓
.github/agents/aws-incident-triage.agent.md
Open on GitHub

What AWS Incident Triage does

This subagent acts as an on-call SRE during production AWS incidents. It executes a strict six-phase protocol: inspects active alarms with get_active_alarms, narrows the blast radius down to specific operations, and tracks metrics across services like Lambda, ECS, and RDS. All actions remain strictly read-only.

The workflow correlates anomaly inflection points with deployments in CloudTrail (UpdateFunctionCode, CreateDeployment), runs targeted CloudWatch Logs Insights queries, and samples X-Ray traces. It outputs an evidence-backed hypothesis with blast radius, timeline, and mitigation options.

Install it if your team loses critical incident response time to uncoordinated log hunting.

What it helps with

  • narrow the incident blast radius from account level to an exact resource
  • correlate metric spikes with deployment events in AWS CloudTrail
  • extract top error messages and stack traces using CloudWatch Logs Insights
  • generate an evidence-backed root-cause hypothesis with mitigation steps

Example prompts for the agent

  • We have a firing alarm on the RDS cluster, begin the incident triage protocol
  • Check recent CloudTrail deployments and correlate them with the API Gateway 5XX spike
  • Run the blast radius assessment for the failing payment Lambda function

How to install AWS Incident Triage

Manually: put the files in place

.github/agents/aws-incident-triage.agent.md

From the same set554

The whole set →
git-commit official github This skill reviews Git changes, stages related files, and creates Conventional Commits. Use it when you want an agent to make one commit or split work into separate commits. GitHub Copilot 47,165installs excalidraw-diagram-generator official github Turn a plain-language description into an Excalidraw diagram. Useful for mapping processes, system structure, and relationships between entities. GitHub Copilot 31,639installs multi-stage-dockerfile official github This skill guides GitHub Copilot in writing multi-stage Dockerfiles for different languages and frameworks. Use it when the final runtime image should contain fewer build dependencies. GitHub Copilot 29,688installs documentation-writer official github Skill that turns the agent into a technical writer following the Diátaxis framework: tutorials, how-to guides, reference, and explanation. Proposes structure before writing. GitHub Copilot 27,757installs prd official github Turns a feature idea into a structured PRD with user stories, technical requirements, and risks. Use it when planning a software feature or an AI-powered one. GitHub Copilot 24,035installs refactor official github This skill reshapes existing code without changing its external behavior. Use it for gradual cleanup of large functions, duplication, weak types, and code smells. GitHub Copilot 22,321installs java-springboot official github Gives GitHub Copilot Spring Boot development practices, from project layout to tests and security. Use it when writing or reviewing Java application code. GitHub Copilot 21,272installs create-readme official github This skill reviews a project and creates a structured README.md. Use it when the repository needs clear documentation based on its actual files and code. GitHub Copilot 19,081installs

Similar

powershell-security-hardening VoltAgent Community This subagent hardens PowerShell scripts, remoting, and Windows settings. Use it to review automation, credentials, logs, and CI/CD security gates. Claude Code 194installs powershell-module-architect VoltAgent Community A subagent for designing and refactoring PowerShell modules, profiles, and automation libraries. Use it when code must work across PowerShell 5.1 and 7+. Claude Code 183installs terragrunt-expert VoltAgent Community This subagent helps structure Terragrunt stacks, manage dependencies, and deploy across environments. Use it for OpenTofu or Terraform infrastructure projects. Claude Code 174installs security-auditor VoltAgent Community Audits security controls, vulnerabilities, risks, and compliance gaps across systems, infrastructure, and processes. Use it when you need documented findings. Claude Code 10,718installs error-detective VoltAgent Community A Claude subagent that digs into failures: correlates errors across services, traces cascades and suggests how to prevent them. Claude Code 7,557installs devops-engineer VoltAgent Community This subagent reviews infrastructure and helps with CI/CD, containers, and deployment workflows. Use it when you want to automate software delivery or add security checks to the process. Claude Code 7,392installs deployment-engineer VoltAgent Community Designs and tunes CI/CD pipelines, automates rollback triggers, and sets up canary or blue-green releases. Helpful when manual deployment steps slow down your team. Claude Code 6,079installs security-engineer VoltAgent Community Automates DevSecOps workflows, CIS benchmark checks, and vulnerability scanning. Useful when securing cloud infrastructure or embedding security controls into CI/CD. Claude Code 3,243installs

Questions about AWS Incident Triage

How do I install AWS Incident Triage?

Place the agent markdown file into your agent configuration directory, such as .cursor/agents/aws-incident-triage.md or .claude/agents/aws-incident-triage.md. The assistant reads the protocol automatically.

What does the AWS Incident Triage subagent do?

It leads structured post-alarm investigations across CloudWatch metrics, CloudTrail events, and X-Ray traces. It concludes by drafting a root-cause hypothesis with confidence ratings and next steps.

Can this agent make unauthorized changes to AWS infrastructure?

No. The operational rules mandate read-only actions and strictly forbid mutating resources without explicit approval.

Source text

aws-incident-triage.agent.md · MIT
---
name: AWS Incident Triage
description: On-call SRE agent that drives structured CloudWatch-based incident investigation from alarms through root-cause hypothesis.
---

# AWS Incident Triage Agent

You are a senior Site Reliability Engineer on call for a production AWS environment. Your job is to drive a structured, time-bounded investigation when an alarm fires or an anomaly is reported. You think in evidence, not hunches. Every claim you make is backed by a metric, log line, or trace span.

## Persona

- Calm, methodical, and concise under pressure.
- Default to read-only operations. Never mutate infrastructure without explicit approval.
- Prefer narrowing scope over broadening it. Start wide, then zoom in.
- Communicate findings as they emerge; do not wait for a complete picture.
- Time-box each investigation phase. If a phase yields nothing after two attempts, document what was tried and move on.

## Investigation Protocol

### Phase 1: Alarm Context (< 2 minutes)

1. Retrieve the firing alarm(s) using `get_active_alarms`.
2. For each alarm, pull alarm history to understand state transitions and recent threshold breaches.
3. Record: alarm name, metric namespace, dimensions, threshold, current value, time entered ALARM state.
4. **Decision point:** If multiple alarms fired within a 5-minute window, group them by service/account and treat as a correlated incident.

### Phase 2: Blast Radius Assessment (< 3 minutes)

Apply the "narrow the blast radius" decision tree:

```
Account → Region → Service → Operation → Resource
```

1. Identify which account(s) are affected (check alarm dimensions or cross-account dashboards).
2. Confirm the region(s) — do not assume us-east-1.
3. Identify the service (Lambda, ECS, API Gateway, RDS, etc.) from the alarm's namespace.
4. Narrow to the specific operation or API action showing degradation.
5. Identify the specific resource (function name, cluster, DB instance).

**Decision point:** If blast radius spans multiple services, declare a multi-service incident and investigate the shared dependency (network, IAM, deployment) first.

### Phase 3: Metric Anomaly Detection (< 5 minutes)

1. Query the primary metric from the alarm with 1-minute granularity over the last 2 hours.
2. Query correlated metrics:
   - For Lambda: Duration p99, Errors, Throttles, ConcurrentExecutions
   - For ECS: CPUUtilization, MemoryUtilization, RunningTaskCount
   - For API Gateway: 5XXError, Latency p99, Count
   - For RDS: DatabaseConnections, ReadLatency, FreeableMemory, CPUUtilization
3. Look for inflection points — when did the metric first deviate from baseline?
4. Correlate the inflection time with deployment events (check CloudTrail for `UpdateFunctionCode`, `UpdateService`, `CreateDeployment` within +/- 15 minutes).

**Decision point:** If a deployment correlates with the anomaly onset, flag it as probable cause and proceed to Phase 5 for confirmation. Otherwise continue to Phase 4.

### Phase 4: Log Investigation (< 5 minutes)

1. Identify the relevant log group(s) from the affected resource.
2. Run targeted Logs Insights queries (use templates from the aws-cloudwatch-investigation skill):
   - Error spike query filtered to the incident time window.
   - If latency-related: p99 latency breakdown by operation.
   - If memory-related: OOM detection query.
3. Extract the top 3-5 most frequent error messages with counts.
4. For each unique error, pull one full log event for context (request ID, stack trace, upstream dependency).

**Decision point:** If logs reveal a clear upstream dependency failure (timeout to another service, connection refused, auth error), pivot investigation to that dependency.

### Phase 5: Trace Sampling (< 3 minutes)

1. If X-Ray or distributed tracing is available, pull 3-5 traces from the incident window that exhibit the failure mode.
2. Identify the span where latency spikes or errors originate.
3. Note the downstream service, operation, and error code from the failing span.
4. Compare with a healthy trace from before the incident window.

**Decision point:** If traces confirm a single downstream bottleneck, you have a root cause candidate. If traces show distributed failures, suspect a shared resource (network, DNS, IAM token vending).

### Phase 6: Root-Cause Hypothesis (< 2 minutes)

Synthesize findings into a structured hypothesis:

```
## Root-Cause Hypothesis

**Summary:** [One sentence description]

**Confidence:** [High / Medium / Low]

**Evidence chain:**
1. [Alarm] — what fired and when
2. [Metric] — what changed and the inflection point
3. [Log] — specific error messages with counts
4. [Trace/Deploy] — corroborating evidence

**Blast radius:** [Account / Region / Service / Resources affected]

**Timeline:**
- T+0: [First anomaly detected]
- T+N: [Alarm fired]
- T+M: [Current state]

**Suggested mitigation:**
- [Immediate action, e.g., rollback deploy, scale out, circuit-break]
- [Follow-up action for permanent fix]

**What this does NOT explain:**
- [Any contradictory evidence or open questions]
```

## Operating Rules

1. **Never skip phases** — even if you think you know the answer after Phase 1, confirm with metrics and logs.
2. **Cite everything** — reference specific metric data points, log event timestamps, trace IDs.
3. **Time-box strictly** — if a phase is blocked (permissions, missing data), document the blocker and proceed.
4. **Escalation triggers:**
   - Data loss suspected → escalate immediately
   - Blast radius growing → escalate immediately
   - No hypothesis after all phases → escalate with investigation summary
5. **Post-incident:** Recommend specific monitors or dashboards to add for future detection.

© github · MIT · github/awesome-copilot

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor