Responding to Incidents and Learning from Them
Incidents are inevitable; what distinguishes mature teams is how quickly they detect, respond, recover and learn. This lesson describes an incident response process for operational incidents, the AWS tools that support each phase, the role of runbooks and communication, and how post-incident analysis turns incidents into lasting improvements.
Learning outcomes
After completing this lesson, you will be able to:
- Describe the phases of operational incident response and the goal of each.
- Explain how severity levels, response roles and automated engagement make the response proportionate and fast.
- Identify the AWS tools that support detection, triage, diagnosis, mitigation and communication.
- Explain why mitigation comes before root cause analysis and give examples of fast mitigations.
- Describe a blameless post-incident analysis and how its actions feed back into systems and processes.
Phases of Incident Response
An operational incident is an unplanned event that degrades service. Response follows a sequence of phases, explained below.
- Detect: alarms, canaries, anomaly detection, SLO burn-rate alerts or customer reports reveal the problem. Detection should come from automated monitoring before customers notice.
- Triage and engage: assess severity from user impact, notify the on-call engineer through a paging tool, and open a shared channel and an incident record, such as an OpsItem.
- Mitigate: restore service as quickly as possible, even before the cause is known.
- Diagnose: determine the cause using metrics, logs, traces and change history.
- Resolve: apply the permanent fix and confirm recovery.
- Learn: run a post-incident analysis and track improvements to completion.
Incident response phases
Severity, Roles and Communication
Severity levels make the response proportionate. They are defined in advance from customer impact, not from the technical symptom, so that the on-call engineer can classify an incident in seconds. A typical scheme is shown below; the exact levels vary between organisations.
| Severity | Definition | Expected response |
|---|---|---|
| SEV1 | A critical function, such as checkout or sign-in, is unavailable for many customers, or data is at risk | Page immediately at any hour; incident commander assigned; status updates every 30 minutes |
| SEV2 | A function is degraded or unavailable for a subset of customers | Page the owning team; updates every hour |
| SEV3 | Minor impact with a workaround, or risk of impact | Handle in working hours through a ticket or OpsItem |
For serious incidents, separating roles prevents the person fixing the problem from also coordinating and communicating. The incident commander owns decisions and priorities, the technical responders investigate and mitigate, and a communications lead posts regular status updates to stakeholders and customers. Updates follow a fixed rhythm and state the impact, what is being done and when the next update will follow, even when nothing has changed.
The engagement steps can be automated so that no time is lost. A CloudWatch alarm action or an EventBridge rule creates an OpsCenter OpsItem with the severity, the related resources and the alarm details; the OpsItem links the relevant Automation runbooks; and EventBridge forwards the event to the paging tool and the team's chat channel. AWS Health events, described in the event-driven operations module, show whether an AWS service issue contributes to the incident, which changes the mitigation, for example to failing over to another Region rather than rolling back.
Mitigate First
Users care about service restoration, not about the root cause. Most incidents correlate with a recent change, so the fastest mitigations reverse changes or remove failing components. Typical mitigations are listed below, most of which were covered in earlier modules.
- Roll back the most recent deployment: CodeDeploy or ECS rollback, CodePipeline stage rollback, CloudFormation rollback, Lambda alias shift.
- Turn off a feature flag or roll back an AppConfig configuration.
- Shift traffic away from an impaired AZ with ARC zonal shift, or from a Region with routing controls or Route 53 failover.
- Scale out, raise reserved concurrency or increase capacity when the problem is load.
- Throttle or block abusive traffic with AWS WAF rate rules or API Gateway usage plans.
- Fail over a database or restart a failing component through an Automation runbook.
Pre-written, tested runbooks make mitigation fast and safe; ideally they are Systems Manager Automation documents attached to the relevant alarms or OpsItems, so the on-call engineer runs them rather than improvising commands.
Mitigate and learn
Tools for Each Phase
The table below maps AWS tools to the incident phases. Several were described in earlier lessons.
| Phase | AWS tools |
|---|---|
| Detect | CloudWatch alarms and anomaly detection, Synthetics canaries, Application Signals SLOs, AWS Health, GuardDuty |
| Triage and engage | SNS, Amazon Q Developer in chat applications, AWS User Notifications, OpsCenter OpsItems, partner paging tools through EventBridge |
| Diagnose | CloudWatch dashboards and investigations, Logs Insights, X-Ray traces, Config timelines, CloudTrail, deployment histories |
| Mitigate | Deployment rollbacks, AppConfig, ARC, Systems Manager Automation runbooks, WAF |
| Learn | OpsItem history, Resilience Hub recommendations, AWS FIS experiments to verify fixes |
Service status
AWS Systems Manager Incident Manager is closed to new customers. For new designs, use CloudWatch alarms and EventBridge to create OpsCenter OpsItems and to notify paging and chat tools, and CloudWatch investigations for AI-assisted diagnosis. Amazon DevOps Guru is also closed to new customers; CloudWatch anomaly detection covers its anomaly use cases.
Post-Incident Analysis
A post-incident analysis, called a correction of error (COE) at AWS, documents what happened and why, and produces actions that prevent recurrence or reduce impact. It is blameless: it assumes people acted reasonably with the information and tools they had, and looks for weaknesses in systems and processes rather than individuals, which encourages honest reporting.
A typical analysis includes a timeline built from alarms, deployment events, CloudTrail and chat records; the customer impact; the time to detect and the time to mitigate; the root cause found by repeatedly asking why each condition existed (the "five whys"); and actions with owners and dates. Good actions are mechanisms rather than intentions: an automated test, a new alarm, a canary, a preventive control, a runbook or a deployment safety change, not "be more careful". Each action should be tracked to completion, and fixes can be verified with an AWS FIS experiment or a game day that reproduces the failure.
An End-to-End Incident
At 10:02, a configuration change reduces a payment service's database connection pool size. At 10:09, the payment availability SLO burn-rate alarm and a checkout canary alarm fire.
-
Detect and engage
A composite alarm creates an OpsItem and pages the on-call engineer through EventBridge; the chat channel receives the details.
-
Mitigate
The OpsItem shows an AppConfig deployment at 10:02 in the related changes; the engineer stops the AppConfig deployment, which rolls back the configuration, and the canary recovers at 10:14.
-
Diagnose
Logs Insights shows connection timeout errors starting at 10:03; X-Ray shows time spent waiting for connections.
-
Learn
The COE finds that the AppConfig environment had no alarms, so the rollback was manual; actions add the SLO alarm to the environment, add a JSON Schema validator with a minimum pool size, and add a load test to the pipeline.
During an incident, an engineer proposes spending an hour finding the root cause before taking any action, although the incident began right after a deployment. What should be done first?
Show answer
Mitigate first: roll back the recent deployment (or disable the related feature flag) to restore service, then investigate the root cause with the evidence preserved.
Exam Tips
Remember for the exam
- Incident phases: detect, triage and engage, mitigate, diagnose, resolve, learn; mitigate before root cause analysis.
- Define severity by customer impact; separate the incident commander, responders and communications; automate OpsItem creation and paging from alarms and EventBridge.
- Fast mitigations reverse recent changes: deployment rollback, feature flag or AppConfig rollback, zonal shift or Regional failover.
- Use OpsCenter OpsItems with Automation runbooks and partner paging tools; Incident Manager and DevOps Guru are closed to new customers.
- Blameless post-incident analyses produce mechanisms (alarms, tests, preventive controls, runbooks), verified with FIS or game days.