what is the difference between terminating and stopping an EC2?

Stopping an EC2 Instance

When you stop an EC2 instance, the instance undergoes a normal shutdown and transitions to a stopped state. Key points include:

  • EBS Volumes: The root and attached EBS volumes persist, so all data stored on them remains intact, though standard EBS storage charges continue to apply
  • Instance Store Data: Any data on ephemeral instance store volumes is lost
Terminating an EC2 Instance

When you terminate an EC2 instance, it is permanently deleted. Key points include:

  • EBS Volumes: By default, the root EBS volume is deleted upon termination, though additional attached volumes may survive depending on the DeleteOnTermination setting rightscale.com+2.
  • Instance Store Data: All ephemeral storage is lost permanently stackharbor.com+1.
  • Instance ID and Configuration: The instance ID and configuration are irreversibly removed stackharbor.com+1.
  • IP Addresses: Non-Elastic public IPs are released; Elastic IPs remain allocated to your account but may incur charges if unattached stackharbor.com.
  • Billing: Compute charges stop immediately, and the instance cannot be restarted stackharbor.com+1.
  • Irreversibility: Termination is a one-way action; data recovery is not possible unless snapshots or backups exist webuildup.live.
    Termination is suitable when you no longer need the instance and want to stop all compute costs, while optionally preserving additional EBS volumes.
  • RAM and Public IP: RAM contents are cleared, and non-Elastic public IP addresses are released
    .
  • Instance ID and Configuration: The instance ID, private IP, and configuration are preserved, allowing you to restart the instance later
  • Billing: You stop incurring compute charges while the instance is stopped, but EBS storage charges continue
    Restarting: When restarted, the instance may be placed on a new physical host, and a new public IP is assigned unless an Elastic IP is used
  • .Stopping is ideal if you plan to resume the instance later without losing your EBS data.
Por favor inicie sesión para preguntar, responder, compartir, "me gusta" y votar.