Forensics on AWS succeeds or fails on order of operations: capture memory first, snapshot disks second, isolate third, and query the control plane throughout, because each step can destroy what the next one needs. This guide goes deep on the three acquisition tasks responders ask about most on AWS: EBS snapshot acquisition, investigation queries in AWS CloudTrail Lake, and memory capture from EC2 instances.
The wider picture of cloud forensics across providers, including chain of custody, retention by provider and automation trade-offs, is covered in the Cloud Forensics Guide. This page does not repeat it. It assumes you are already in an AWS incident and need to know exactly what each AWS mechanism captures, what it misses, and what the documentation warns about.
This is an independent guide from NHI Mgmt Group, based on AWS's public documentation as of November 2026. It is not sponsored or reviewed by AWS. Product features change, so confirm settings against AWS's current documentation.
Key takeaways
- An EBS snapshot contains only data written to the volume when the snapshot was requested. It excludes data cached by applications or the operating system, which is one reason memory comes first.
- AWS recommends stopping an instance before snapshotting a root volume for consistency. In an investigation, that conflicts with memory preservation, so decide deliberately and record the choice.
- AWS CloudTrail Lake supports Trino
SELECTqueries over immutable event data stores, but it will no longer be open to new customers starting 31 May 2026. Existing customers can continue to use it. - AWS's Automated Forensic Orchestrator for Amazon EC2 guidance captures Linux memory with LiME and AVML, streams captures to Amazon S3, and isolates the instance after acquisition.
- The guidance itself warns that LiME "intermittently returns an unusable capture" and that acquisition metadata written from the target "is not proof". Validate every capture.
- Run the investigation from a dedicated forensic account with cross-account roles, not from the compromised account.
Order of operations on an EC2 incident
Every acquisition step changes the system. Stopping an instance destroys memory. Changing the security group drops sessions an attacker might reveal. Revoking role sessions stops credential use but also alerts an attacker who is watching. The AWS forensic orchestrator guidance resolves this with an explicit order: isolation "runs after acquisition, so the instance keeps its normal network path while it is imaged."
A defensible default sequence for a single suspect instance:
- Record the instance ID, account, Region, attached volumes, instance profile role and current security groups.
- Enable termination protection so that an automated process or the attacker cannot delete the evidence.
- Capture memory from inside the guest and stream it off the host.
- Snapshot every attached EBS volume, recording request time and state.
- Isolate: replace security groups, revoke the instance role's older sessions, and restrict the instance profile.
- Query CloudTrail for the instance role and any credentials linked to the instance, before and after the time of compromise.
Where the risk of continued attacker activity is high, such as active data exfiltration, you may choose to isolate first and accept the loss of some network evidence. Make that a recorded decision by the incident lead, not a default of your tooling.
Building the forensic account
Do not acquire, store or analyse evidence inside the account under investigation. The orchestrator guidance describes three account roles: a forensic account, a Security Hub aggregator account, and the application accounts being monitored. Application accounts deploy a cross-account role template "to establish a trust relationship between forensic components", and every function reaches the target instance by assuming a dedicated forensic access role in each Region.
Two practical warnings from the guidance apply to any home-grown design as well:
- In a single-account deployment, swapping the instance profile fails with
UnauthorizedOperation. The guidance logs this as non-critical and reports success, while the security group change, session revocation and termination protection still take effect. If you build your own automation, make sure a partial isolation is reported as partial. - Default configuration values matter. The guidance warns that leaving its Region default in place causes the stack to roll back. Test the deployment in each Region you operate in before you need it.
Encrypt the evidence bucket with a key the forensic account controls, enable versioning, and restrict who can read and delete objects. For identity design around cross-account roles, see the AWS IAM Policies and Roles Guide.
EBS snapshot acquisition
Snapshots are the standard disk acquisition method on AWS. The orchestrator guidance states that "disk acquisition is snapshot-based and therefore operating-system agnostic." Understanding exactly what a snapshot contains is what makes it defensible.
What a snapshot captures
The Amazon EBS documentation is precise: "The snapshot includes only the data that was written to the volume at the time the snapshot was requested. It does not include data that has been cached by applications or the operating system." A snapshot is a point-in-time image of the block device as of the request, not of everything the instance knew. Files an attacker has written but the operating system has not yet flushed may be absent.
Asynchronous creation and the pending state
AWS explains that "snapshot creation is asynchronous. The snapshot is created immediately, but it remains in the pending state until all of data has been transferred to Amazon S3. This can take several hours to complete, depending on the number of modified blocks on the volume." The volume remains usable during that time "without impacting the snapshot". Record the request time as the acquisition time, and record when the snapshot reached completed.
AWS also notes that multiple pending snapshots on the same volume can reduce volume performance, and that quotas apply to pending and concurrent snapshot requests. On a large incident with many volumes, plan for quota limits and stagger requests.
Consistency choices
For consistency, AWS recommends pausing writes before the snapshot, or unmounting the volume from within the instance, and for root volumes recommends stopping the instance. Each of these interacts with an investigation:
| Option | Consistency | Forensic cost |
|---|---|---|
| Snapshot while running | Crash consistent at best | Unflushed cache absent; nothing else lost |
| Pause writes or unmount | Better file system consistency | Requires actions inside the guest that change state |
| Stop instance, then snapshot root | Consistent root volume | Memory lost unless captured first |
For most investigations, capture memory, then snapshot while running, and accept crash consistency. Forensic tools handle crash-consistent file systems routinely, and you keep the running instance for further live response if needed.
Multi-volume snapshots
AWS supports multi-volume snapshots of all or a subset of the volumes attached to an instance. Use them for instances with data on several volumes, so that the images share one point in time. A database volume snapshotted ten minutes after the root volume makes timeline reconstruction harder.
Encryption, location and special cases
- "A snapshot automatically gets the same encryption status as the volume from which it is created", and snapshots of encrypted volumes use the same KMS key. To move evidence to the forensic account, the forensic account needs use of that key, or you copy the snapshot and re-encrypt it under a forensic key. Record each copy as a custody step.
- Snapshots of Region resources are created in the same Region. Local Zone and Outpost resources can be snapshotted locally or to the parent Region.
- AWS recommends not creating snapshots of volumes attached to instances that are hibernated or enabled for hibernation. Check hibernation status before acquisition and note it.
The EBS snapshot page does not describe hashing or integrity verification. Hash the volume contents when you attach a volume created from the snapshot to your analysis host, and record that hash as your working baseline. The Disk Imaging and Forensic Acquisition Guide covers hashing and write blocking practice.
EC2 memory capture
The AWS guidance captures memory from inside the guest operating system. The Automated Forensic Orchestrator for Amazon EC2 guidance is the most detailed AWS-published description of how to do it at scale.
Linux tools and fallback
The guidance tries two independent tools in order, LiME then AVML by default. LiME is a kernel module pinned to a specific release, is x86_64 only, and may need compiling for the guest kernel unless a module is staged. AVML is verified by SHA256 before it runs and supports both x86_64 and aarch64. A capture is rejected and the next tool tried if the upload is under 65,536 bytes or no kernel banner is found, and rejected captures are kept as object versions rather than deleted.
The guidance is candid about limits. It states that "LiME intermittently returns an unusable capture", that the cause has not been isolated, and that captures need checking before a case is closed. It also states that neither tool produces an atomic image. Memory changes while it is read, so expect some inconsistency in structures that span the capture window.
Operating system support
The guidance lists verified targets as of its current release: Amazon Linux 2023, Amazon Linux 2 (noted as end of life), RHEL 8 with AVML, and Windows Server 2016 and 2019. It states that RHEL 7 and 9 and Windows Server 2022 and later are not supported, and lists Ubuntu and other Debian derivatives as supported once a symbol table exists. Check your fleet against this list now. An unsupported kernel discovered mid-incident costs hours.
Analysis readiness
The guidance notes that Volatility 3 needs a symbol table for each exact kernel release and must be rebuilt after patching changes the kernel version. Build symbol tables as part of your patch pipeline, not after an incident. For analysis method once you have a capture, see the Memory Forensics Guide.
Off-host streaming and provenance
Captures stream directly to S3 without being written to the target's disk, which avoids overwriting unallocated space on the volume you will image next. The tool used is recorded as S3 object metadata. The guidance warns, however, that this metadata is written from the target using the target's own credentials, is "not independently verified" and "is not proof". On a compromised host, the attacker could in principle influence it. Record acquisition details independently from the forensic account side as well.
Isolating the instance
The orchestrator guidance describes the isolation actions it takes after acquisition:
- A 0-ingress, 0-egress isolation security group. The guidance explains that a deliberate all-port ingress rule is part of its design so that existing sessions are dropped rather than left open. Read the guidance's own description before copying this pattern.
- Revocation of older STS sessions for the instance's role, using the
AWSRevokeOlderSTSSessionspolicy. - A deny-all inline policy on the instance profile role.
- Termination protection.
Session revocation matters because instance roles issue temporary credentials that can be used from outside the instance. Credentials taken through the instance metadata service, tracked in ATT&CK as T1552.005 Cloud Instance Metadata API, remain valid until they expire unless you revoke them. Isolating the network without revoking sessions leaves the stolen credentials working.
Investigating with CloudTrail Lake
Host evidence shows what happened on the instance. CloudTrail shows what was done with AWS APIs, including by the instance's role and by credentials stolen from it. Abuse of those credentials maps to ATT&CK T1078.004 Cloud Accounts.
Availability first
AWS states: "AWS CloudTrail Lake will no longer be open to new customers starting May 31, 2026. If you would like to use CloudTrail Lake, sign up prior to that date. Existing customers can continue to use the service as normal." If your organisation was not already using CloudTrail Lake, plan your investigation around trail logs delivered to S3 instead. The AWS CloudTrail Guide covers trail configuration.
What CloudTrail Lake gives an investigator
- Immutable stores. Event data stores are "immutable collections of events based on criteria that you select by applying advanced event selectors." That property supports evidential use.
- SQL. "CloudTrail Lake supports all valid Trino
SELECTstatements and functions", including JOINs across event data stores. Query results can be viewed for up to seven days and saved to S3. Save results for every query that supports a finding. - Organisation scope. An organisation event data store can hold events from multiple Regions and accounts, which suits an investigation that crosses account boundaries.
- Point-in-time copies. Trail events can be copied into an event data store to create a point-in-time snapshot, which helps when the incident predates the store.
- Retention. The one-year extendable retention pricing option allows up to 3,653 days, and the seven-year option up to 2,557 days.
- Athena federation. An event data store can be federated so its metadata appears in the AWS Glue Data Catalog and it can be queried with Amazon Athena.
Timing and cost
AWS states that "CloudTrail typically delivers events within an average of about 5 minutes of an API call. This time is not guaranteed." Allow for this when you check whether containment took effect: an absence of events in the last few minutes is not proof that activity has stopped. Queries are billed on data scanned, so bound queries by time range from the start.
Query plan for a compromised instance
Run queries in this order, saving each result set with the query text. Write the field-level SQL against the event schema documented for your event data store, and start from the sample queries offered in the CloudTrail Lake console.
- All API activity by the instance role in the incident window, grouped by event name and source IP address.
- The same role's activity from source addresses that are not the instance, which indicates credentials used off-host.
- Failed calls by the role, which often show an attacker probing permissions.
- Calls that change identity: new access keys, role trust changes, new users, policy attachments.
- Calls that reduce visibility, such as changes to trails or logging. See How to detect attackers disabling cloud audit logging.
- Any credentials created in step 4, followed through their own activity.
For the detailed workflow when an access key, rather than an instance role, is the starting point, see How to Investigate CloudTrail for a Compromised Access Key.
Encryption decision
By default CloudTrail encrypts events in an event data store. You can supply your own KMS key, but AWS warns that "after you associate an event data store with a KMS key, the KMS key cannot be removed or changed." Choose the key with long-term evidence access in mind, and protect it from deletion.
Triggering and automating acquisition
The orchestrator guidance does not acquire automatically on every alert. It notes that "which instance is under investigation is not known until a finding arrives", and requires Security Hub to be enabled so that a custom action can be created. Findings are pushed to the forensic account through a Security Hub aggregator. This keeps a human decision at the start of each acquisition, which is sensible for a process that isolates production instances.
Whatever you automate, keep the provenance lessons from the guidance: hash every artefact, record tool versions on the analysis host, and treat metadata written from the target as unverified. Analysis hosts in the guidance are short-lived instances built from Amazon Linux 2023 with EC2 Image Builder, and command output is truncated and not archived by default. If you rely on it, change that default or capture output separately so your notes are complete.
Common failure patterns
- Stopping the instance to get a consistent root snapshot and losing memory.
- Isolating before acquisition without a recorded decision, losing network-dependent evidence.
- Changing the security group but not revoking the instance role's sessions, leaving stolen credentials valid.
- Recording the snapshot completion time as the acquisition time.
- Snapshotting volumes of a multi-volume instance minutes apart.
- Discovering during the incident that the forensic account cannot use the KMS key on the evidence snapshots.
- Accepting a memory capture without checking it is usable, despite the documented LiME issue.
- Planning an investigation around CloudTrail Lake when the organisation never signed up before 31 May 2026.
- Treating the last five minutes of CloudTrail silence as proof that containment worked.
Practitioner checklist
- Stand up a forensic account with cross-account roles and test it in every Region in use.
- Confirm KMS key access from the forensic account for encrypted volumes.
- Check fleet operating systems against the memory capture support list and prebuild Volatility symbol tables.
- Set termination protection first, then capture memory, then snapshot, then isolate.
- Use multi-volume snapshots and record request time, state and hibernation status.
- Revoke older role sessions as part of isolation and verify each isolation step individually.
- Confirm whether CloudTrail Lake is available to you; if not, prepare trail log queries in advance.
- Save every query and its results to the evidence bucket with hashes.
- Validate every memory capture before closing the case.
Standards and references
- AWS: Create Amazon EBS snapshots
- AWS: Working with AWS CloudTrail Lake
- AWS Solutions: Automated Forensic Orchestrator for Amazon EC2
- NIST: SP 800-86 Guide to Integrating Forensic Techniques into Incident Response
- NIST: SP 800-61 Rev. 3, Incident Response Recommendations and Considerations for Cybersecurity Risk Management
- MITRE ATT&CK: Valid Accounts: Cloud Accounts
- MITRE ATT&CK: Cloud Instance Metadata API
Related NHI Mgmt Group resources: Cloud Forensics Guide · Memory Forensics Guide · AWS CloudTrail Guide · How to Investigate CloudTrail for a Compromised Access Key