Incident Response on AWS
Part of the AWS Roadmap
In short
At 2 a.m. your bill alert fires: 40 GPU servers you never launched. What you do in the next hour depends on whether you planned it on a calm day.
Incident response on AWS means having a plan before trouble: detect with GuardDuty, CloudWatch and budget alerts, contain by disabling keys or isolating instances, investigate with CloudTrail, then recover and write down what you learned.

Think of it like this
The school fire drill
In a fire drill nobody debates who carries the register or which staircase to use. It was decided and practised months ago. When the real alarm rings, everyone just follows the plan. Incident response is that drill for your cloud.
Watch it happen
Leaked key: the response plan
1/6GuardDuty or a billing alarm flags strange activity: new instances in a region you never use.
The big ideas
What you need to know
Logs first
Without CloudTrail turned on and kept safe, you can't answer what the attacker did. Enable it before you need it.
Runbooks
Write step-by-step playbooks for common cases: leaked key, public bucket, compromised instance.
Who to call
Know your contacts in advance: team lead, security, and the cloud provider's support. Save the numbers somewhere offline.
Isolate, don't destroy
Move a compromised instance to a quarantine security group instead of terminating it straight away.
See it in code
Walk through the code
1# 1. Contain: disable the leaked key2aws iam update-access-key --user-name ci-bot \3 --access-key-id AKIAEXAMPLEKEY --status Inactive4 5# 2. Preserve: snapshot the suspicious instance's disk6aws ec2 create-snapshot --volume-id vol-0abc123 \7 --description "IR-2026-10-27 evidence"8 9# 3. Isolate: swap to a no-traffic security group10aws ec2 modify-instance-attribute --instance-id i-0def456 \11 --groups sg-quarantine1/3Inactive, not deleted, so you can still see the key ID in logs.
Practise these on your own test account. Real incidents also need your company's process and, often, provider support.
Save yourself the pain
Common mistakes
Oops
Terminating everything suspicious immediately to "make it stop".
Do this instead
Contain first, preserve evidence, then clean up. Deleted instances can't tell you how they got in.
Oops
Writing the response plan during the incident.
Do this instead
Write and rehearse it on a quiet day, even as a 30-minute tabletop exercise with the team.
Your mission
Tabletop drill, solo edition
Quick check
You find an instance mining crypto. What should you do first?
Go deeper
- 1Write a one-page runbook for a leaked access key.
- 2Practise isolating an instance by swapping its security group for one with no rules.
- 3Find the CloudTrail events that show what a given access key did.
More topics at this stop
Stuck on this topic? Ask an Insider
Get 1:1 guidance from people who've walked this exact path — on the InsideEdge app.