4 Answers
4

I strongly recommend using EBS based instances and periodically creating snapshots of your EBS volume. In the case of a potential hardware issue, EBS based instances can be stopped/started (which causes them to start up on different hardware, unless you are very unlucky)

I recommend snapshots because EBS volumes don't have the same redundancy as S3. They're more reliable than a regular hard drive, but I've had EBS volumes fail and my snapshots have saved the day.

ec2-modify-instance-attribute --instance-initiated-shutdown-behavior stop
does not work to non EBS instances.

If you're using EC2 instances and you have data that needs to persist, you should be using EBS volumes to hold the data. Otherwise you're responsible for putting together a process to periodically upload to S3 or other backup strategy to have restored upon reboot. I have close to a dozen EC2 instances running and use a combination of both strategies.

The drive mounted for / on EC2 instances is meant to clear when it is shutdown completely which is what halt, shutdown and poweroff do. The drive will remain during a reboot but when the instance is shutdown completely it is destroyed which is exactly as Amazon tells you in the terms of use for EC2 and why they recommend EBS if it needs to persist.

The only other option is to use EBS-backed instances which would then persist but you'll be paying for the storage of the EBS volume. This would but the entire instance on an EBS volume rather than just the data necessary to be persisted.