How can I configure my EC2 Spot Instances so that the root EBS volume won’t be deleted when I terminate the instance?
I want to configure my Amazon Elastic Compute Cloud (Amazon EC2) Spot Instances so that the root Amazon Elastic Block Store (Amazon EBS) volume isn't deleted when I terminate the instance.
"I want to configure my Amazon Elastic Compute Cloud (Amazon EC2) Spot Instances so that the root Amazon Elastic Block Store (Amazon EBS) volume isn't deleted when I terminate the instance.ResolutionBy default, when EC2 Spot Instances are terminated, all EBS volumes attached to that instance are deleted because the DeleteOnTermination attribute is set to true.To change the DeleteOnTermination attribute for a new Spot requestOpen the Amazon EC2 console, and then choose Spot Requests from the navigation pane.Choose Request Spot Instances.Choose an Availability Zone, and then choose Next.In EBS volumes, clear Delete.After you clear the Delete box, finish creating your Spot request. Any new instances that are launched when this Spot request is fulfilled will have DeleteOnTermination set to false.Note: EBS volumes with DeleteOnTermination set to false incur charges and remain in your EBS volume console. You must manually delete the volume. For more information, see Amazon EBS pricing.To change the DeleteOnTermination attribute for a running Spot InstanceUse the modify-instance-attribute command in the AWS Command Line Interface (AWS CLI) to configure the root EBS volume to persist on termination.Related informationSpot InstancesFollow"