I write about this topic because it's one that may not be immediately obvious to those new to AWS and with previous virtualization experience. In AWS, there is a much looser tie between various components that make up a server.
An EC2 instance is essentially a reservation for processor power and memory. Persistent block storage (EBS) is associated with that instance through a device mapping. A snapshot is related to a volume, not the instance itself. If you want to "snapshot an instance," you are actually taking snapshots of each individual attached volume.
Snapshots are incremental; they capture only the blocks that have changed since the last snapshot. Because you cannot technically "revert" a volume in place using traditional methods, you must create a new volume from the snapshot and swap it with the existing one.
Manual Steps (The "Classic" Way):
- Open your AWS EC2 console and ensure you have the proper region selected.
- Identify the Volume ID of the root device you wish to revert. Note the device name (e.g.,
/dev/xvda). - Shutdown the instance if it is still running (required for manual swaps).
- Go to the Snapshots pane, select your target snapshot, and choose Create Volume from Snapshot.
- Note: Ensure the new volume is in the same Availability Zone (AZ) as your instance.
- Detach the old volume from the instance and attach the newly created volume using the exact same device name you noted in Step 2.
- Restart your instance.
Reference: For more on device mappings, see the AWS Device Naming Documentation.