AWS Difference between a snapshot and AMI
Solution 1:
There are two types of AMIs (and corresponding instances):
instance-store (sometimes called S3-based). These are less common and I don't recommend them for beginners. An instance-store AMI is a copy of the root instance-store volume plus some metadata, all saved in an S3 bucket in a special format
EBS boot. This is probably what you are using. An EBS boot AMI is an EBS snapshot of the EBS root volume plus some metadata like the architecture, kernel, AMI name, description, block device mappings, and more.
You can take a snapshot of an EBS boot volume and turn it into an EBS boot AMI by registering it with the appropriate metadata. The trickiest part of this is specifying the correct AKI id (kernel) so that it boots correctly.
Solution 2:
The major difference is between the type of service referred to. A snapshot is of an EBS volume where you are able to save state and reboot with the same data at a certain point in time.
An AMI is similar, but its for the EC2 instances themselves. You cannot take a snapshot of a non ebs backed instance, but you can create a AMI (system image) of one.
Generally I use EBS snapshots as backup solutions for a database volume and I use an AMI to save instance configuration
Solution 3:
I was confused by that as well. Here's simplest way of understanding it:
EBS Snapshot
very often represents a backup of specific EBS volume, it might be any volume (Root volume, data volume, etc.)AMI
(Amazon Machine Image) is a backup of Entire EC2 instance. For example, with proper configuration it's possible to create AMI which includes multiple EBS volumes.
Now, it might sound confusing, but they are both stored as a "EBS Snapshots".
Just think of that way:
-
EBS Snapshot
is a just a data backup. -
AMI
is a representation of system state at specific time. You can also boot from it.
Solution 4:
An AMI can be created using a snapshot. For example, using a single "snapshot" you can create multiple AMIs, say one PV and one HVM AMI using the same snapshot.
So, snapshot has the system / OS data. AMI is (snapshot + machine/hardware metadata).