Skip to main content

Stopping and terminating instances:

 Stopping and terminating instances:

You can stop or terminate a running instance at any time.

 Stopping an instance 

When an instance is stopped, the instance performs a normal shutdown, and then transitions to a stopped state. All of its Amazon EBS volumes remain attached, and you can start the instance again at a later time. You are not charged for additional instance usage while the instance is in a stopped state. A minimum of one minute is charged for every transition from a stopped state to a running state. If the instance type was changed while the instance was stopped, you will be charged the rate for the new instance type after the instance is started. All of the associated Amazon EBS usage of your instance, including root device usage, is billed using typical Amazon EBS prices. When an instance is in a stopped state, you can attach or detach Amazon EBS volumes. You can also create an AMI from the instance, and you can change the kernel, RAM disk, and instance type. 

Terminating an instance 

When an instance is terminated, the instance performs a normal shutdown. The root device volume is deleted by default, but any attached Amazon EBS volumes are preserved by default, determined by each volume's delete On Termination attribute setting. The instance itself is also deleted, and you can't start the instance again at a later time. To prevent accidental termination, you can disable instance termination. If you do so, ensure that the disableApiTermination attribute is set to true for the instance. To control the behavior of an instance shutdown, such as shutdown -h in Linux or shutdown in Windows, set the instanceInitiatedShutdownBehavior instance attribute to stop or terminate as desired. Instances with Amazon EBS volumes for the root device default to stop, and instances with instance store root devices are always terminated as the result of an instance shutdown. 

Comments

Popular posts from this blog

Terraform Commands

  Terraform Cheat Sheet terraform version $ terraform version Terraform v1.0.1 on darwin_amd64 terraform init $ terraform init Ask for input if necessary. If false, will error if input was required. $ terraform init -input=false You can also change the backend details using  -backend-config  option.,  reconfigure  will reconfigure the backend, ignoring any saved configuration . $ terraform init -backend-config=PATH/TO/CONFIGURATION_FILE -reconfigure