There are two types of AMI provided by AWS:
- Instance store backed
- An instance-store backed is an EC2 instance whose root device resides on the virtual machine’s hard drive.
- When you create an instance, then AMI is copied to the instance.
- Since “instance store-backed” instances root device is stored in the virtual machine’s hard drive, so you cannot stop the instance. You can only terminate the instance, and if you do so, the instance will be deleted and cannot be recovered.
- If the virtual machine’s hard drive fails, then you can lose your data.
- You need to leave this instance-store instance in a running state until you are completely done with it.
- You will be charged from the moment when your instance is started until your instance is terminated.
- EBS backed
- An “EBS backed” instance is an EC2 instance that uses EBS volume as a root device
- EBS volumes are not tied to a virtual hardware, but they are restricted to an availability zone. This means that EBS volume is moved from one machine to another machine within the same availability zone.
- If the virtual machine’s fails, then the virtual machine can be moved to another virtual machine.
- The main advantage of “EBS backed” over “instance store-backed” instances is that it can be stopped. When an instance is in a stopped state, then EBS volume can be stored for a later use. The virtual machine is used for some other instance. In stopped state, you are not charged for the EBS storage.