Amazon EC2 instance store - Amazon Elastic Compute Cloud

Amazon EC2 instance store

An instance store provides temporary block-level storage for your instance. This storage is located on disks that are physically attached to the host computer. Instance store is ideal for temporary storage of information that changes frequently, such as buffers, caches, scratch data, and other temporary content. It can also be used to store temporary data that you replicate across a fleet of instances, such as a load-balanced pool of web servers.

An instance store consists of one or more instance store volumes exposed as block devices. The size of an instance store as well as the number of devices available varies by instance type and instance size. For more information, see Instance store volumes.

The virtual devices for instance store volumes are ephemeral[0-23]. Instance types that support one instance store volume have ephemeral0. Instance types that support two or more instance store volumes have ephemeral0, ephemeral1, and so on.


      Amazon EC2 instance storage
Instance store pricing

Instance store volumes are included as part of the instance's usage cost.

Instance store volume and data lifetime

The number, size, and type of instance store volumes are determined by the instance type and instance size. For more information, see Instance store volumes.

Instance store volumes are attached only at instance launch. You can't attach instance store volumes after launch. You can’t detach an instance store volume from one instance and attach it to a different instance.

An instance store volume exists only during the lifetime of the instance to which it is attached. You can’t configure an instance store volume to persist beyond the lifetime of its associated instance.

The data on an instance store volume persists even if the instance is rebooted. However, the data does not persist if the instance is stopped, hibernated, or terminated. When the instance is stopped, hibernated, or terminated, every block of the instance store volume is cryptographically erased.

Therefore, do not rely on instance store volumes for valuable, long-term data. If you need to retain the data stored on an instance store volume beyond the lifetime of the instance, you need to manually copy that data to more persistent storage, such as an Amazon EBS volume, an Amazon S3 bucket, or an Amazon EFS file system.

There are some events that can result in your data not persisting throughout the lifetime of the instance. The following table indicates whether data on instance store volumes is persisted during specific events, for both virtualized and bare metal instances.

Event What happens to your data?
User-initiated instance lifecycle events
The instance is rebooted The data persists
The instance is stopped The data does not persist
The instance is hibernated The data does not persist
The instance is terminated The data does not persist
The instance type is changed The data does not persist *
A Windows AMI is created from the instance The data does not persist in the created AMI **
An EBS-backed AMI is created from the instance The data does not persist in the created AMI **
An instance store-backed AMI is created from the instance The data persists in the AMI bundle uploaded to Amazon S3 ***
User-initiated OS events
A shutdown is initiated The data does not persist †
A restart is initiated The data persists
AWS scheduled events
Instance stop The data does not persist
Instance reboot The data persists
System reboot The data persists
Instance retirement The data does not persist
Unplanned events
Simplified automatic recovery The data does not persist
CloudWatch action based recovery The data does not persist
The underlying disk fails The data on the failed disk does not persist
Power failure The data persists upon reboot

* If the new instance type supports instance store, the instance gets the number of instance store volumes supported by the new instance type, but the data does not transfer to the new instance. If the new instance type does not support instance store, the instance does not get the instance store volumes.

** The data is not included in the EBS-backed AMI, and it is not included on instance store volumes attached to instances launched from that AMI.

*** The data is included in the AMI bundle that is uploaded to Amazon S3. When you launch an instance from that AMI, the instance gets the instance store volumes bundled in the AMI with the data they contained at the time the AMI was created.

† Termination protection and stop protection do not protect instances against instance stops or terminations as a result of shutdowns initiated through the operating system on the instance. Data stored on instance store volumes does not persist in both instance stop and termination events.