Skip to main content
Welcome back. This lesson explains a practical, evidence-driven approach to troubleshooting in AWS. You’ll learn a reproducible mindset, the AWS services and tools most useful during incidents (CloudWatch, X-Ray, CloudTrail, AWS Health, OpsCenter), and concrete techniques for diagnosing failed deployments, scaling issues, networking, permissions, and more.

Troubleshooting mindset — be systematic and data-driven

Adopt these core practices when responding to incidents:
  • Verify with data: hypotheses must be backed by logs, metrics, traces, or audit records.
  • Isolate and control changes: most incidents follow a change; focus on what changed and limit blast radius.
  • Document findings: record symptoms, timelines, root causes, and remediation to avoid organizational amnesia.
  • Layered analysis: work through layers—Application, Platform, Infrastructure you control, and AWS service health (provider infrastructure).
A slide titled "The Systematic Troubleshooting Mindset" showing four numbered steps—Verify with Data, Isolate Variables, Document Findings, and Layered Analysis—each with a short explanatory note. The steps are displayed as colorful rounded badges inside separate panels.
A simple, effective technique to reach a root cause is the “Five Whys”: start with the observed symptom and keep asking “why?” until you reach a plausible root cause or an actionable next step. Example chain:
  1. Service unavailable — why?
  2. Target health checks failing — why?
  3. Security group blocking health check port — why?
  4. Security group recently updated — why?
  5. Automated compliance rule updated configuration (root cause)
Use the Five Whys to reveal systemic causes and guide corrective actions.
A "Five Whys Root Cause Analysis" diagram with five colored circular icons in sequence. It traces the failure chain from "Service unavailable" through failing health checks and a security group update to the root cause: an automated compliance rule changed configuration.

A formal troubleshooting framework (six steps)

Follow a repeatable process:
  1. Define the problem — articulate clear symptoms and impacted scope.
  2. Gather data — collect logs, metrics, alarms, traces, and audit records.
  3. Form a hypothesis — correlate symptoms with evidence.
  4. Test the hypothesis — run controlled tests or make one change at a time.
  5. Implement a fix if validated.
  6. Verify and document the outcome.
When testing, change a single variable at a time. Multiple simultaneous changes make it impossible to isolate cause and effect.

Layered troubleshooting model

Think in layers: Application → Platform → Infrastructure you control → AWS Service Health. Each layer needs different tools and questions.
  • Application: Are logs and traces showing errors? Are dependencies timing out?
  • Platform: Is the OS or container runtime healthy? Are pods scheduled and ready?
  • Infrastructure: Are EC2 instances, VPC networking, and storage healthy and reachable?
  • AWS service health: Are provider-side outages or scheduled maintenances impacting you?
A slide titled "AWS Service Layer Troubleshooting Model" with a four-layer colored diagram labeled AWS Service Health, Infrastructure, Platform, and Application. To the right is an "Infrastructure" checklist listing items like EC2 instance health, RDS availability, VPC networking, security groups, NACLs, route tables, and IAM permissions.
Map tools to layers:

CloudWatch — central observability hub

CloudWatch provides metrics, Logs, Logs Insights, alarms, and dashboards. Correlate metrics and logs to validate hypotheses quickly (e.g., CPU spike, then thread dump, then service error).
A presentation slide titled "Using CloudWatch for Troubleshooting" showing the CloudWatch icon with five feature tiles underneath labeled Metrics, Logs, Logs Insights, Alarms, and Dashboards.

Tracing with AWS X-Ray

For distributed systems, tracing is essential. AWS X-Ray provides a service map, trace analysis, and segment detail. Use annotations and metadata to correlate failures across microservices and drill into timing or dependency bottlenecks.
A presentation slide titled "AWS X‑Ray for Distributed System Troubleshooting" listing key capabilities (Service Map, Trace Analysis, Segment Details, Annotations and Metadata) with icons and brief descriptions about visualizing dependencies, analyzing request flows, examining timing, and adding custom trace data.
Useful X-Ray actions:
  • Inspect the service map to find red or slow nodes.
  • Select traces during the incident window and analyze segment durations.
  • Add annotations for correlation keys (request id, user id).

Audit trail: CloudTrail

CloudTrail records AWS API activity and is the primary source to answer who changed what, when, from which IP, and with which credentials. Use it to correlate configuration changes, deployment actions, or unauthorized activity with incidents.
CloudTrail records AWS API activity. It will not capture internal application-level actions (e.g., Kubernetes events inside a pod) — use CloudWatch Logs, container logging, or Kubernetes audit logs for those.
A slide titled "CloudTrail for Change and Configuration Troubleshooting" showing a laptop and cloud icon next to a checklist of troubleshooting use cases. The list includes identifying who changed or deleted resources, tracking security group and IAM changes, correlating deployments with incidents, detecting unauthorized API calls, and investigating configuration drift.

AWS Health — provider-side visibility

Use the Personal Health Dashboard for account-specific advisories (scheduled maintenance, operational issues) and the Service Health Dashboard (status.aws.amazon.com) for global service posture. Both can integrate with EventBridge for automated notifications and remediation.
A slide titled "AWS Health for AWS Service Troubleshooting" showing two boxed panels. The left panel describes the Personal Health Dashboard (scheduled maintenance, security notifications, operational issues) and the right panel describes the Service Health Dashboard (global AWS service status and broader service disruptions).

Systems Manager OpsCenter for operational records

OpsCenter aggregates OpsItems from CloudWatch, CloudTrail, AWS Health, Config, and EventBridge. It provides structured incident records, allows runbook association, and links related resources to streamline consistent recording and handoffs.
A slide titled "Systems Manager OpsCenter for Incident Management" listing five key capabilities—OpsItems, Automatic Aggregation, Runbook Association, Related Resources, and Operational Insights—with brief descriptions and numbered icons.

Troubleshooting failed deployments

Each AWS deployment service (CodePipeline, CodeBuild, CodeDeploy, CloudFormation) publishes detailed logs and error reports—most are available in CloudWatch Logs. Managed platforms (ECS, EKS, Elastic Beanstalk) also publish events and logs that point to deployment failures (container images, startup scripts, health checks, or IAM role problems).
A slide titled "Troubleshooting Failed Deployments" showing the AWS logo and icons for deployment services (AWS CodePipeline, CodeBuild, CodeDeploy, and CloudFormation). A caption notes that each AWS deployment service provides detailed logging and error reporting.
Checklist for deployment failures:
  • Inspect CloudWatch Logs for build and deployment logs.
  • Check targeted instances or containers for startup errors.
  • Verify IAM roles and permissions used in the pipeline.
  • Confirm artifact registry access (ECR) and image tag correctness.

Auto Scaling troubleshooting

Scaling incidents (failed launches, unhealthy instances, unexpected policy triggers) surface in CloudWatch (scaling activities, alarms) and CloudTrail (why an action executed). Use EC2 console events, launch configuration details, and instance status checks to diagnose failed launches.
A presentation slide titled "Troubleshooting Auto Scaling Failures" showing four colored cards — Scaling Activities, Failed Launches, Health Checks, and Scaling Policies — each with an icon and brief guidance. It lists checks like reviewing scale-out/scale-in events, examining EC2 launch failures, verifying health checks, and reviewing CloudWatch alarms.

Containers and Kubernetes

Control-plane events for ECS and EKS often flow to CloudWatch. For deeper Kubernetes troubleshooting, query the cluster directly with kubectl:
CloudWatch Container Insights offers node- and pod-level metrics for EKS/ECS workloads that help correlate resource pressure with application errors.
A slide titled "Troubleshooting Performance and Latency Issues" with four colorful petal-shaped sections. Each section represents a layer—Application, Database, AWS Service, and Network—with icons and brief troubleshooting tips.

Performance and latency — pick tools by layer

  • Application: X-Ray traces, application metrics, and thread/profiler dumps to find hotspots and slow downstream calls.
  • Database: RDS Performance Insights or database-specific monitoring to identify slow queries, locks, or contention.
  • Network: VPC Flow Logs, Reachability Analyzer, and packet captures (where available) to locate dropped packets or blocked connections.
  • AWS service layer: Personal Health Dashboard and Service Health Dashboard for provider-side degradations.

Network troubleshooting

Most connectivity issues are security-related: security groups, Network ACLs, or route table problems. Use VPC Flow Logs and Reachability Analyzer to pinpoint where traffic is being dropped or blocked. Confirm route tables, NAT gateways, and Internet Gateway configuration for cross-AZ or internet-bound traffic.
An infographic titled "Troubleshooting Network and Connectivity Issues" showing a numbered checklist of AWS networking checks (Security Groups, Network ACLs, Route Tables, VPC Flow Logs, Reachability Analyzer). Each numbered item is connected to a short explanation along a vertical timeline.

IAM and permissions

Permission errors are a frequent root cause. Use CloudTrail to search denied API calls, the IAM Policy Simulator to validate a principal’s effective permissions, and Access Analyzer to find overly-broad or risky policies. Error messages often include the missing permission or the wrong region/ARN—parse them carefully.
A presentation slide titled "Troubleshooting IAM Permission Issues" showing four numbered techniques: CloudTrail, IAM Policy Simulator, Access Analyzer, and Error Messages. Each box lists actions: search denied API calls, check principal permissions, identify overly permissive policies, and carefully parse error messages.

Anti-patterns and best practices

Avoid these common anti-patterns:
  • Restarting services or instances without investigation.
  • Making multiple simultaneous changes (prevents isolation).
  • Ignoring logs and audit trails (CloudWatch, CloudTrail).
  • Skipping AWS Health checks when provider issues are possible.
  • Lacking baseline metrics — you may mistake normal behavior for anomalies.
Best practices:
  • Be data-driven and use a layered analysis.
  • Document as you go and update runbooks after validation.
  • Change only one variable at a time and use the Five Whys to expose systemic causes.
A slide titled "Troubleshooting Anti-Patterns to Avoid" showing two columns: common anti-patterns (restarting without investigation, multiple simultaneous changes, ignoring CloudTrail, skipping AWS Health, no baseline metrics) and best practices (data-driven investigation, systematic layer approach, document as you go, single-variable testing, and the 5 Whys).

Post-incident review and learning

After remediation, run a blameless post-incident review focused on system improvements:
  • Record a timeline and root cause analysis.
  • Update runbooks and playbooks with validated remediation steps.
  • Identify monitoring and alerting gaps and add targeted observability.
  • Implement preventive changes so incidents are less likely or have reduced impact.
A slide titled "Post-Incident Review and Learning" that lists steps like focusing on system improvements, recording timelines and root causes, updating runbooks, identifying monitoring gaps, and implementing preventive changes. Each step is linked to colored outcome labels such as Blameless Culture, Complete Documentation, Runbook Updates, Monitoring Gaps, and Preventive Actions.
That concludes this lesson on systematic troubleshooting in AWS.

Watch Video