Lesson 5 of 6 Incident Response and Forensics

Testing Incident Response Plans and Automation

This lesson explains how regular testing proves that detection, runbooks, automation and people work together, and measures how quickly, since a plan that has never been exercised is only an assumption.

Learning outcomes

After completing this lesson, you will be able to:

  • Distinguish tabletop exercises from simulations that inject real events.
  • Identify what to measure during an exercise.
  • Explain how the plan and automation are kept current as infrastructure changes.

Testing methods

An incident response plan that has never been tested is likely to fail when it is needed, and several methods test it at different depths. A tabletop exercise walks the team through a scenario in discussion, which reveals gaps in roles, contacts and procedures at little cost. A game day simulates an incident for real in a controlled environment, testing people, tools and access together. GuardDuty sample findings generate realistic findings, so you can confirm that alerts and automated responses fire as designed.

AWS Fault Injection Service injects failures, such as stopping instances, with stop conditions that end the experiment if it goes too far. AWS Resilience Hub assesses whether applications meet their recovery time and recovery point objectives (RTO and RPO). The following table summarises the methods.

MethodWhat it involves
Tabletop exercisesWalking through a scenario and the responses to it
Game daysSimulating an incident for real in a controlled environment
GuardDuty sample findingsGenerating findings to test detection and automation paths
AWS Fault Injection ServiceInjecting failures with stop conditions
AWS Resilience HubAssessing applications against RTO and RPO targets

The following diagram follows the test and what it uncovered.

Testing the isolation chain in staging with a GuardDuty sample finding. The finding reached EventBridge, but the runbook failed because its assume role had been renamed. After fixing the role, the team measured two minutes from finding to isolation and added the test to a monthly game day.
The test ran in a staging account.
Match the pairs

Ways to test the plan

Exam skills 2.1.3

Match each testing method with what it involves.

Log in to try this activity Interactive activities are free with an account.

What to measure

Exercises, from tabletop discussions to simulations that inject real events, show whether detections, permissions and runbooks work. Their value depends on recording what happened rather than relying on impressions, so that weaknesses can be fixed and improvements measured from one exercise to the next. The following list describes the principal measures.

  • Time to detect: from the simulated event to the first alert.
  • Time to contain: from the alert to isolation of the affected resource.
  • Time to recover: from containment to normal operation.
  • Gaps found: missing alarms, broken permissions for responders, outdated runbooks.
Fill in the number

Response timings

Exam skills 2.1.3

A game day starts with a simulated event at 10:00. The first alert arrives at 10:07, the instance is isolated at 10:19, and service is normal at 11:04.

Log in to try this activity Interactive activities are free with an account.

Keeping the plan current

Infrastructure changes break response automation silently: a renamed role, a new account without the forwarding rule, a runbook referring to a deleted resource. Testing on a schedule, and after significant changes, keeps the plan working. Each test ends with actions recorded and tracked like any other work.

Select all that apply

Changes that silently break response

Exam skills 2.1.3

Pick the changes that can break incident response automation without anyone noticing.

Log in to try this activity Interactive activities are free with an account.
Worked example

Testing the isolation chain with sample findings

The isolation automation was built months ago, and several roles have since been renamed. The team tests the whole chain in a staging account by generating a GuardDuty sample finding of a type the rule matches:

DETECTOR=$(aws guardduty list-detectors --query 'DetectorIds[0]' --output text)
aws guardduty create-sample-findings --detector-id $DETECTOR \
  --finding-types "Backdoor:EC2/C&CActivity.B!DNS"

The finding reaches EventBridge, but the runbook fails because its assume role no longer exists. The team fixes the role, records the time from finding to isolation (two minutes), and adds the test to a monthly game day. Without the test, the failure would have been discovered during a real incident.

Check yourself

How can detection and response automation be tested without a real attack?

Show answer

With GuardDuty sample findings.

Exam Tips

Remember for the exam

  • To test the plan with real faults, use AWS Fault Injection Service.
  • To check readiness against RTO and RPO, use Resilience Hub.
  • Use GuardDuty sample findings to test detection and response automation.
  • Measure time to detect, contain and recover.
  • Test regularly and after significant infrastructure changes.