Free tech learning for everyone, from basics to pro

Cloud MonitoringCloud SecurityAdvanced

Incident response and forensics in the cloud: snapshots, isolation, logs and provider support

In short: Cloud incidents most often start with stolen credentials or misconfiguration, and they move fast. Prepare logging, a forensic account and runbooks in advance. When it happens, contain identities and isolate resources, preserve evidence with snapshots and logs, rebuild from clean sources and involve your provider where their layers are affected.

How cloud incidents differ

The incident response lifecycle still applies, but the cloud changes the details. The most common starting points are leaked access keys, phished admin accounts, exposed storage and vulnerable internet-facing workloads. Attackers act through the same APIs you do, can spin up resources in any region in seconds and may try to delete logs and backups.

On-premises versus cloud forensicsOn-premisesPull the diskPhysical accessNetwork tapsYou own all layersCloudSnapshot the volumeAPI access onlyFlow and audit logsProvider owns some layers
Figure 1. In the cloud, evidence is gathered through APIs and logs, and some layers belong to the provider.

Under the shared responsibility model you investigate your own identities, configurations and workloads. You usually cannot inspect the provider's hypervisors or physical hosts, and you rarely need to.

Prepare before anything happens

  • Enable organisation-wide audit logging, flow logs and DNS logs, stored in a protected log account (see logging strategy).
  • Create a forensic account or subscription with tools and storage, to which snapshots can be copied for analysis.
  • Pre-create an incident response role with read access everywhere and the specific permissions needed to isolate resources, protected by break-glass procedures.
  • Write cloud-specific runbooks for leaked keys, compromised users, exposed buckets and compromised instances or pods.
  • Know how to contact your provider's support and security teams, and what your support plan covers.
  • Practise with tabletop exercises based on realistic cloud scenarios.

Contain and preserve

Cloud incident responseDetectalert,findingScopelogs,identitiesContainrevoke,isolatePreservesnapshots,logsEradicaterebuildcleanRecoverreview,improve
Figure 2. The incident response lifecycle applied to cloud: contain identities and resources quickly while preserving evidence.
SituationContainmentEvidence to keep
Leaked access keyDeactivate the key, revoke active sessions, apply a deny policy to the identityAudit logs of every call made with the key
Compromised userDisable account, revoke sessions and refresh tokens, reset MFASign-in logs, consent grants, mailbox rules
Compromised VMSwap to a quarantine security group with no inbound and limited outbound, detach from load balancerDisk snapshot, memory capture if tools allow, instance metadata
Compromised podApply deny network policy, cordon node, scale replacement from clean imageContainer logs, filesystem copy, Kubernetes audit logs

Avoid simply terminating a compromised instance: that destroys volatile evidence and possibly the disk. Isolate first, tag the resource as under investigation, then snapshot.

aws ec2 create-snapshot --volume-id <volume-id> --description "IR case 2026-014" --tag-specifications 'ResourceType=snapshot,Tags=[{Key=case,Value=2026-014}]'
aws ec2 modify-instance-attribute --instance-id <instance-id> --groups <quarantine-sg-id>
aws iam update-access-key --user-name <user> --access-key-id <key-id> --status Inactive

Note that changing a security group may not cut connections that are already established and tracked, so combine it with network ACLs or host-level isolation if needed. Record every action with a timestamp and keep hashes of exported evidence to maintain chain of custody.

Investigate, eradicate and recover

Use audit logs to build a timeline: the first malicious API call, which identities were used, what was created, read or changed, and in which regions. Look for persistence such as new users, new access keys, new roles with trust to external accounts, OAuth app grants, Lambda functions or scheduled tasks. Then eradicate by removing everything the attacker created and rotating all credentials they could have seen. Rebuild workloads from known-good images and infrastructure-as-code rather than cleaning them.

Tip: if personal data may have been accessed, involve legal and data protection colleagues early; regulations such as the UK GDPR set tight notification deadlines.

Practice

Why isolate and snapshot a compromised VM instead of terminating it?
Terminating destroys memory and possibly disk evidence. Isolation stops the threat while snapshots preserve evidence for analysis.
After a leaked access key is deactivated, what else must you check?
The audit logs for everything the key did, including persistence such as new users, keys or roles, and resources created in any region.
What is a forensic account used for?
A separate, controlled account where snapshots and evidence are copied and analysed away from the compromised environment.

Key takeaways

  • Cloud incidents usually begin with stolen credentials or misconfiguration.
  • Prepare logs, a forensic account, IR roles and runbooks in advance.
  • Contain identities fast; isolate resources rather than deleting them.
  • Preserve evidence with snapshots, logs and a recorded timeline.
  • Hunt for persistence, rotate credentials and rebuild from clean code.
Tracks your learning on this device only. See your progress on the learning paths.

About the author

Mohamed Fayas

Founder of FM TecHub. CCNA certified, with a BTEC HND in Network Engineering, and BEng (Hons) in Computer Networking and Cloud Security. He writes practical, plain-English guides on networking, security and cloud.

More about the author

Original content written by Mohamed Fayas for FM TecHub. © 2026 FM TecHub. You're welcome to share a link to this page; please don't copy the text elsewhere without permission.

Stay up to date by email

New notes, tools and security news from FM TecHub, explained simply. Free.

We only use your email to send these updates. See our privacy policy.