4

I am new to AWS and trying to understand the difference between instance store and EBS. Reading this page, it says:

The data on an instance store volume persists only during the life of the associated instance; if you stop or terminate an instance, any data on instance store volumes is lost

So then why would anyone use this? Also when I log in to my VM, and save a file to /home/xxx/yyy how do I know if its stored in instance store or in EBS?

From this page: Instance Store Usage Scenarios

Instance store volumes are 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.

4
  • 1
    Why would anyone use this? ...To persist data on an instance per-life basis. You need to use EBS if you want semi-permanent storage. Commented Mar 29, 2015 at 22:54
  • The page you linked says "An EBS volume behaves like a raw, unformatted, external block device... After an EBS volume is attached to an instance, you can use it like any other physical hard drive." So presumably they give you a name, drive letter or other similar handle. Commented Mar 29, 2015 at 22:59
  • 1
    Bees with machine guns is a great example where this provides utility. github.com/newsapps/beeswithmachineguns
    – Alex Smith
    Commented Mar 29, 2015 at 23:01
  • thanks. this link provides further info on how to mount EBS to the VM: docs.aws.amazon.com/AWSEC2/latest/UserGuide/…
    – morpheus
    Commented Mar 29, 2015 at 23:31

1 Answer 1

3

Amazon EC2 Instance Store is a storage volume that only exists while the EC2 instance is running. This is because the storage is directly attached to the host machine that runs the EC2 instances. When an instance is stopped, the resources (CPU, RAM, instance store) used by that virtual machine are made available to other users. Thus, the contents is lost.

In the early days of Amazon EC2, this was the only type of storage available. Users had to copy their data to Amazon S3 if they wanted it to remain after the instance terminated. In fact, there was no concept of "stopped" back then, since a stopped instance lost its disk storage and could not be restarted.

These days, fortunately, Elastic Block Store (EBS) can be used to persist data even when the associated EC2 instance is stopped. Thus, the instance can be restarted and all data stored on EBS volumes are still available.

Any data stored on Instance Store, however, is lost when the instance is stopped. This is why it is also called Ephemeral Storage.

As to which to use... it's best initially to only use EBS, because it operates in the way most people expect a disk to operate. Instance Store can be confusing for new users of EC2. However, there are several benefits to using Instance Store:

  • It is free (no additional charge to use it, while there are charges associated with EBS)
  • On modern instance types, it is SSD and very fast (in some cases, over 100,000 IOPS)
  • It is great for swap files, temporary files and replicated data, which don't need to persist between reboots

Basically, the choice is yours... Start with EBS, then use Instance Store if you can see it providing a benefit.

See also: StackOverflow Benefits of EBS vs. instance-store (and vice-versa)

Not the answer you're looking for? Browse other questions tagged or ask your own question.