How I built an AWS forensic response pipeline with Step Functions, Python, Terraform, cross-account KMS and a human approval gate. Plus the Lambda timeout that reminded me a snapshot copy is not a function call.
The 3 AM Problem
It's 3:07 AM. GuardDuty flags an EC2 instance talking to a known malicious IP.
Someone gets paged. They open Slack, check the finding, and search Confluence for the incident response runbook. The last edit was eight months ago.
Step 4 says "Snapshot the volumes before remediation."
Simple enough, until you're signed into the wrong AWS account, using a role that cannot read the encryption key, wondering whether the snapshot should happen before or after isolation.
Then someone says the sentence every security engineer loves to hear at 3 AM:
"Can we just terminate the instance?"
No. Not yet.
A runbook can tell people the correct order. It cannot stop an exhausted engineer from doing things in the wrong order.
That bothered me enough to try a different approach.…