Instance store is ephemeral block storage. This is preconfigured storage that exists on the same physical server that hosts the EC2 instance and cannot be detached from Amazon EC2.
Instance store is generally well suited for temporary storage of information that is constantly changing, such as buffers, caches, and scratch data. It is not meant for data that is persistent or long lasting.
If you need persistent long-term block storage that can be detached from Amazon EC2 and provide you more management flexibility, such as increasing volume size or creating snapshots, you should use Amazon EBS.
Feature | EC2 Instance Storage | Amazon EBS |
---|---|---|
Definition | Temporary, physically attached storage on the EC2 host | Persistent, network-attached block storage for EC2 |
Persistence | Data is lost when the instance stops, hibernates, or terminates | Data persists independently of the EC2 instance lifecycle |
Performance | High IOPS and low latency due to local storage | Configurable IOPS and throughput; depends on volume type |
Size | Fixed and determined by the instance type (e.g., 900 GB for m5d instances) | Configurable from 1 GiB to 16 TiB per volume |
Cost | Included in the cost of EC2 instances that support it | Pay-as-you-go based on volume type, size, and performance |
Backup Support | Manual backups using application-level tools | Supports snapshots stored in Amazon S3 |
Durability | No durability guarantees; data is lost if the instance fails | Durable; data is replicated within the same Availability Zone |
Attachability | Tied to the specific instance, cannot be detached | Can be attached/detached and moved between instances |
Scalability | Limited by the instance type | Dynamically scalable; volume size and performance can be modified |
Use Cases | Temporary storage for caching, buffers, and scratch data | Persistent storage for databases, applications, and backups |
Multi-AZ Access | Not applicable (local to instance only) | Limited to the same AZ as the EC2 instance |
Encryption | Depends on the instance type; supports local NVMe encryption | Supports encryption at rest and in transit with AWS KMS |
Snapshot Support | Not supported | Supports incremental snapshots stored in Amazon S3 |
Booting from Instance Store Volumes
Instance Store-Backed Instances: Historically, EC2 allowed instances to boot directly from instance store volumes (referred to as instance store-backed AMIs). However, this is now much less common, as EBS-backed AMIs are the preferred and default option for most modern workloads.
Limited Instance Types: Only certain older instance types support booting from instance store volumes. Modern instance types like the m5, c5, and similar are designed to boot from EBS volumes