Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What root-device to use for a new EC2 instance?

I'm trying to get started with Amazon's EC2.

I have to choose an image (AMI) to start with. I've settled on using the official Ubuntu AMI, but I have two options for the root store - "instant" or "ebs". (See this page).

Being new to AWS, I'm not sure I really understand the difference. What do the two options mean, and what are the pros/cons of each?

like image 343
Edan Maor Avatar asked Dec 21 '10 14:12

Edan Maor


1 Answers

EBS (Elastic Block Store) means that there is an abstraction of a hard drive available for the root of your instance. If your instance terminates then everything is still there.

If you use the instance store then the contents of your root directory are stored in the image on S3. This means that, if the instance terminates, then all the information in the root directory goes away.

I've been using a (now very old) Ubuntu instance using the instance store and it's not a problem. The data I really want to persist through reboots is stored on EBS volumes which are mounted into root (in this case, this is database data and app server applications and logs).

The issue becomes what happens if you need two of the same instance and need your pool of instances to grow and shrink based on demand. If you were using an EBS root store then you would need to copy the EBS data before starting the second instance. With an instance root store you can just start it.

like image 129
Sarge Avatar answered Oct 27 '22 02:10

Sarge