AWS Troubleshooting, RCA & Operational Runbooks
Effective incident response is about narrowing down what changed and which layer failed as fast as possible—correlating Datadog metrics, logs, and Watchdog RCA with live AWS configurations, producing clean evidence for escalations, and turning every incident into a permanent fix.
1. Four-Layer AWS Triage Playbook
When a Datadog alert fires, classify the failure into one of four buckets within the first 5 minutes:
| Failure Class | Datadog Signals | AWS Configs to Check Immediately |
|---|---|---|
| Performance / Saturation | P99 latency spike, CPU/memory > 90%, DB lock waits, Lambda duration jump, throttling metrics | EC2/ASG scaling limits, RDS Performance Insights & max_connections, EBS IOPS/throughput burst balance, Lambda reserved concurrency |
| Permission / IAM | 403 Forbidden, AccessDenied, UnauthorizedOperation in application or CloudTrail logs | IAM Role trust & inline/managed policies, Permission Boundaries, KMS Key Policy, S3 Bucket Policy, SCPs in AWS Organizations |
| Resource / Quota Failure | InsufficientInstanceCapacity, LimitExceeded, disk-full errors, OOM kills, failed pod scheduling | AWS Service Quotas (vCPU, ENI, EIP), Subnet IP exhaustion, RDS FreeStorageSpace, Auto Scaling Activity History, AWS Health Dashboard |
| Network Connectivity | Connection timeouts, TCP resets, 502/504 from ALB, REJECT entries in VPC Flow Logs | Security Groups (inbound/outbound), NACLs (stateless return traffic), Route Tables, NAT/IGW/Transit Gateway routes, DNS (Route 53) |
Fast Correlation Workflow
- Check Change Events First: Overlay Datadog Deployment / Event markers and Watchdog RCA against the metric spike—and query AWS CloudTrail for recent Terraform/CDK/CloudFormation applies or IAM/SG edits in the last 30–60 minutes.
- Isolate Blast Radius: Filter Datadog APM and logs by
availability_zone,region,service, andinstance_idto see whether the failure is a single node, single AZ, or account-wide. - Mitigate Before Deep-Diving: Roll back a bad release, shift traffic away from a degraded AZ, or increase a constrained quota/storage limit first—then preserve logs and snapshots for full RCA.
2. Diagnosing & Escalating Network Issues Cleanly
Network incidents waste hours when tickets just say "Service A can't reach Service B." Before escalating to the network team, gather exact hop-level proof:
Step 1: Confirm Packet Drops in Datadog
- Query AWS VPC Flow Logs in Datadog filtered by source/destination IP, ENI ID, port, and
action:REJECT. - Check ALB/NLB target health and timeout metrics (
aws.applicationelb.httpcode_elb_5xx,target_connection_error_count).
Step 2: Run AWS VPC Reachability Analyzer
AWS VPC Reachability Analyzer statically evaluates the full path between a source (EC2 instance, ENI, Lambda, or Internet Gateway) and a destination (RDS, EC2, VPC Endpoint, Transit Gateway) without sending live packets. It checks Security Groups, NACLs, Route Tables, Peering, and Transit Gateways hop by hop and pinpoints the exact blocking rule (e.g., sg-0abc1234 or missing TGW route).
Network Team Escalation Template
## Network Escalation: [Short Incident Title]
- **Severity / Impact:** [e.g., P1 — Checkout API timing out to Payments DB in ap-southeast-1]
- **Start Time (UTC):** [YYYY-MM-DD HH:MM UTC]
- **AWS Account & Region:** [Account ID / Name] — [Region / AZs affected]
- **Source → Destination:**
- Source: [ENI / EC2 / Subnet ID / CIDR]
- Destination: [IP / Hostname / RDS / VPC Endpoint / Port & Protocol]
- **Evidence Collected:**
- Datadog Dashboard / Log Link: [URL]
- VPC Flow Logs Finding: [e.g., REJECT on eni-xxxx -> 10.20.4.15:3306]
- AWS VPC Reachability Analyzer Path ID & Result: [path-xxxx — blocked at Transit Gateway route table tgw-rtb-xxxx]
- **Recent Changes Checked:** [Confirmed no SG/Terraform changes in our repo; last deploy at HH:MM]
- **Requested Action:** [e.g., Verify TGW route propagation / on-prem firewall allowlist for CIDR X]
3. Blameless Root Cause Analysis (RCA) Template
Every P0/P1 or recurring P2 incident gets a concise, blameless RCA focused on systemic prevention:
# Incident RCA: [INC-XXXX — Short Title]
- **Date / Duration:** [YYYY-MM-DD | Start – End UTC | Total TTR]
- **Severity & User Impact:** [Affected services, % errors, duration]
- **Detection:** [Datadog Monitor Name / Customer Report | Time to Detect]
## 1. Executive Summary
2–3 plain-English sentences explaining what happened, why, and how it was resolved.
## 2. Timeline (UTC)
- `HH:MM` — Trigger event (e.g., Terraform apply / traffic spike / AZ degradation)
- `HH:MM` — Datadog alert triggered
- `HH:MM` — Mitigation applied
- `HH:MM` — Full recovery verified
## 3. Root Cause & Contributing Factors (5 Whys)
- **Direct Cause:** [Exact technical mechanism]
- **Why it wasn't caught earlier:** [Missing CI policy check, missing monitor, gap in DR drill]
## 4. Action Items (Prevent Recurrence)
| Action | Type (IaC / Alert / SOP) | Owner | Due Date | Status |
| :--- | :--- | :--- | :--- | :--- |
| Add Terraform checkov rule blocking X | IaC Guardrail | @owner | YYYY-MM-DD | Open |
| Add Datadog monitor for Y threshold | Observability | @owner | YYYY-MM-DD | Open |
| Update Runbook Z with diagnostic command | Runbook | @owner | YYYY-MM-DD | Open |
4. Infrastructure SOP & Runbook Standard
Good SOPs and runbooks are written for someone woken up at 3 AM:
- Keep them version-controlled alongside IaC (reviewed in PRs whenever architecture or alert thresholds change).
- Structure every runbook consistently:
- Purpose & Scope: When to use this SOP (and when not to).
- Pre-requisites & Permissions: Required AWS SSO role, CLI tools, and Datadog links.
- Diagnostic Steps: Exact read-only commands / Datadog queries to confirm the root cause.
- Mitigation & Rollback Steps: Safe, copy-pasteable actions with explicit verification checks after each step.
- Escalation Path: Clear owner and escalation criteria (Security Team, Network Team, DBA).
- Review cadence: Audit high-traffic SOPs quarterly and immediately after any incident where a runbook step was missing or outdated.