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

◇◆丶佛笑我妖孽 提交于 2019-12-04 03:03:27

I recommend EBS, but it really depends on your scenario. Our company uses EBS specifically for the following reasons (ripped off from http://LabSlice.com/FAQ at the bottom):

"The EBS-backed machines are faster to load, can be stopped and can be taken a snapshot of in a matter of minutes. They support the newer Micro instances sizes (only 2 cents/hr) and in many cases will be of lower cost to run for typical LabSlice usage profiles. All these benefits made us decide to support only the EBS-backed AMIs."

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.

user116293

I'm not an expert, but I'd recommend the EBS-backed AMI. It's easier to have your changes persist across crashes/terminations.

Amazon's guide to instant/S3 vs. EBS-backed is here.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!