An instance store provides temporary block-level storage for an EC2 instance.
Instance store storage is located on the 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, or for data that is replicated 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.
Size of an instance store varies by instance type.
Virtual devices for instance store volumes are ephemeral[0-23], starting the first one as ephemeral0 and so on.
While an instance store is dedicated to a particular instance, the disk subsystem is shared among instances on a host computer.
Instance Store Lifecycle
Instance store data lifetime is dependent on the lifecycle of the Instance to which it is attached
Data on the Instance store persists when an instance is rebooted
However, the data on the instance store does not persists if the
underlying disk drive fails
instance stops i.e. if the EBS backed instance with instance store volumes attached is stopped
If an AMI is created from an Instance with Instance strore volume, the data on its instance store volume isn’t preserved
Instance Store Volumes
Instance type of an instance determines the size of the instance store available for the instance, and the type of hardware used for the instance store volumes
Instance store volumes are included as part of the instance’s hourly cost.
Some instance types use solid state drives (SSD) to deliver very high random I/O performance, which is a good option when storage with very low latency is needed, but the data does not need to be persisted when the instance terminates or you can take advantage of fault tolerant architectures.
Instance Store Volumes with EC2 instances
EBS volumes and instance store volumes for an instance are specified using a block device mapping
Instance store volume can be attached to an EC2 instance only when the instance is launched
Instance store volume cannot be detached and reattached to a different instance
After an instance is launched, the instance store volumes for the instance should be formatted and mounted before it can be used.
Root volume of an instance store-backed instance is mounted automatically.
Instance Store Optimizing Writes
Because of the way that Amazon EC2 virtualizes disks, the first write to any location on an instance store volume performs more slowly than subsequent writes.
Amortizing (gradually writing off) this cost over the lifetime of the instance might be acceptable.
However, if high disk performance is required, AWS recommends initializing the drives by writing once to every drive location before production use
Sample Exam Questions
Questions are collected from Internet and the answers are marked as per my knowledge and understanding (which might differ with yours).
AWS services are updated everyday and both the answers and questions might be outdated soon, so research accordingly.
AWS exam questions are not updated to keep up the pace with AWS updates, so even if the underlying feature has changed the question might not be updated
Open to further feedback, discussion and correction.
Please select the most correct answer regarding the persistence of the Amazon Instance Store
The data on an instance store volume persists only during the life of the associated Amazon EC2 instance
The data on an instance store volume is lost when the security group rule of the associated instance is changed.
The data on an instance store volume persists even after associated Amazon EC2 instance is deleted
A user has launched an EC2 instance from an instance store backed AMI. The user has attached an additional instance store volume to the instance. The user wants to create an AMI from the running instance. Will the AMI have the additional instance store volume data?
Yes, the block device mapping will have information about the additional instance store volume
No, since the instance store backed AMI can have only the root volume bundled
It is not possible to attach an additional instance store volume to the existing instance store backed AMI instance
No, since this is ephemeral storage it will not be a part of the AMI
When an EC2 instance that is backed by an S3-based AMI Is terminated, what happens to the data on the root volume?
Data is automatically saved as an EBS volume.
Data is automatically saved as an EBS snapshot.
Data is automatically deleted
Data is unavailable until the instance is restarted.
A user has launched an EC2 instance from an instance store backed AMI. If the user restarts the instance, what will happen to the ephemeral storage data?
All the data will be erased but the ephemeral storage will stay connected
All data will be erased and the ephemeral storage is released
It is not possible to restart an instance launched from an instance store backed AMI
The data is preserved
When an EC2 EBS-backed instance is stopped, what happens to the data on any ephemeral store volumes?
Data will be deleted and will no longer be accessible
Data is automatically saved in an EBS volume.
Data is automatically saved as an EBS snapshot
Data is unavailable until the instance is restarted
A user has launched an EC2 Windows instance from an instance store backed AMI. The user has also set the Instance initiated shutdown behavior to stop. What will happen when the user shuts down the OS?
It will not allow the user to shutdown the OS when the shutdown behavior is set to Stop
It is not possible to set the termination behavior to Stop for an Instance store backed AMI instance
The instance will stay running but the OS will be shutdown
The instance will be terminated
Which of the following will occur when an EC2 instance in a VPC (Virtual Private Cloud) with an associated Elastic IP is stopped and started? (Choose 2 answers)
The Elastic IP will be dissociated from the instance
All data on instance-store devices will be lost
All data on EBS (Elastic Block Store) devices will be lost