An EC2 instance can be interrupted at any time, and this is necessary, as already mentioned, in David's answer (+1). You can organize an unsuccessful instance of the Elastic Block Store (EBS) to remain available, despite this, see, for example, the corresponding FAQ What happens to my data when the system shuts down? :
Data stored in local storage of instances will only be stored as long as this instance is alive. However, data stored on Amazon EBS volume will be retained regardless of instance life. if you use the Amazon EBS volume as the root partition, then you set the "Delete on completion" flag to "N" for your Amazon EBS volume to remain outside the lifetime of the instance . [emphasis mine]
This is explained in more detail in section 2. Exclude upon termination in an article by Eric Hammond [a href = "http://alestic.com/2010/01/ec2-instance-locking" rel = "nofollow noreferrer"> Three ways to protect instances EC2 from accidental termination and data loss:
Although EBS volumes are created and attached to the instance, the instances are saved in a stop / start cycle, but by default they are destroyed and lost when the EC2 instance finishes. This behavior can be changed using the boolean delete-on-end buried in the documentation for the -block-device-mapping option of an ec2-introductory instance.
It refers to the documentation of ec2-run instances , and all of this is shown in more detail in the Amazon EC2 Root Storage Concept :
By default, the root device volume and other volumes created when the Amazon EBS-backed instance is started are automatically deleted when the instance is completed [...]. You can change the default by setting the DeleteOnTermination flag to the value that is required when starting the instance. For an example of how to change a flag during startup, see Using Amazon EC2 Root Device Storage .
source share