Chapter-2 EC2 Instance Termination

In this chapter, we will learn about EC2 instance Termination process.

Q) How can we Terminate EC2 instance?

Step 1: Login to AWS console page and create one EC2 instance with  Termination protection as True.

Step 2: Navigate to Actions->Instance State -> Terminate

We have Stop ,Reboot and Terminate options. Click on Terminate option.

After clicking on Terminate option, we get Warning for Terminate Instances.

Step 3: First we have to disable Termination Protection. Then we can terminate EC2 Instance.

Navigate to  Actions -> Instance Settings -> Change Termination Protection

Step 4: Click on Yes,Disable button.

Step 5: Navigate to Actions->Instance State -> Terminate.

Click on Yes,Terminate button.

We can see status of EC2 Instance:


Reserved Instances:

We can buy instances. In Reserved Instances tab , we can select desired parameters for instance which is required for requirement.

Post adding into cart , we can buy Reserved Instances for mentioned duration.



Q) Do we have to turn Termination Protection on?

Ans: Termination Protection is turned off by default, you must turn it on.

Q) What is the default action for the root EBS volume when the instance is terminated?

Ans : On an EBS-backed instance, the default action is for the root EBS volume to be deleted when the instance is terminated.

Q) Can we encrypt EBS Root Volumes of DEFAULT AMI’s ?

Ans : EBS Root Volumes of your DEFAULT AMI’s cannot be encrypted. You can also use a third party tool (bit locker etc) to encrypt the root volume, or this can be done when creating AMI’s in the AWS console or using the API. Additional Volumes can be encrypted.

Q) Describe about Request Spot Instances ?

Request Spot Instances:

  • Excess EC2 capacity that AWS tries to sell on a market exchange basis
  • Very low hourly compute cost
  • Ideal for grid computing and HPC
  • Flexible start and end times
  • Customer creates a Spot Request and specifies AMI, desired instance types, and other key information
  • Customer defines highest price they’re willing to pay for an instance. If capacity is constrained and others are willing to pay more, your instance might get terminated or stopped
  • Charged by the hour unless AWS terminates in which case the hour is free
  • Spot request can be a “fill and kill”, “maintain”, or “duration-based
  • For “One-Time Request”, instance is terminated and ephemeral data is lost
  • For “Request and Maintain”, instance can be configured to Terminate, Stop, or Hibernate until the price point can be met again
  • Cannot use encrypted volumes

Q) Describe about Reserved Instances ?

Reserved Instances:

  • Purchase (or agree to purchase) usage of EC2 instances in advance for significant discounts over On-Demand pricing
  • It Provides a capacity reservation when used in a specific AZ
  • AWS Billing automatically applies discounted rates when you launch an instance that matches your purchased RI
  • Its Capacity is reserved for a term of 1 or 3 years
  • Its EC2 has three RI types: Standard, Convertible,and Scheduled
  • Standard = commitment of 1 or 3 years, charged whether it’s on or off
  • Scheduled = reserved for specific periods of time,accrue charges hourly, billed in monthly increments over the term (1 year)
  • Its RIs are used for steady state workloads and predictable usage
  • It is Ideal for applications that need reserved capacity
  • It Can change the instance size within the same instance type
  • Its Instance type modifications are supported for Linux only
  • It Cannot change the instance size of Windows RIs
  • It is Billed whether running or not
  • It Can sell reservations on the AWS marketplace
  • It Can be used in Auto Scaling Groups
  • It Can be used in Placement Groups
  • It Can be shared across multiple accounts within Consolidated Billing
  • If you don’t need your RI’s, you can try to sell them on the Reserved Instance Marketplace