Launch a Spot Instance with Amazon EC2

Lab Details

  1. This lab walks you through the steps to launch an EC2 Spot Instance using the AWS Management Console. You will also learn about Saving Summary and pricing history.

  2. You will practice using Amazon Machine Image (AMI) to launch Amazon EC2 Spot Instance and use key pairs for SSH authentication to log into your instance.

  3. You will create a web page and publish it.

  4. Duration: 1 hour

  5. AWS Region: US East (N. Virginia) us-east-1


What is EC2 Spot Instance

  • Spot Instances are an unused part of Amazon EC2, using which you can save up to 90% on cost as compared to On-Demand cost, but AWS can interrupt your spot instances if the Current Price is higher than the Maximum Price you specified.

  • Spot uses the same EC2 instances (AMI and instance type) what On-Demand and Reserved Instances use. It is the best to fit for use cases where data is reproducible and can sustain the interruption at any point in time.

  • You can use Spot Instance as additional compute capacity to your On-Demand or Reserved Instances, where fault-tolerant is acceptable.

  • EC2 Spot Instances can be launched the same way you launch EC2 Instance, like using Spot Fleet. Auto Scaling Groups or AWS Management Console.

  • If AWS terminates or stops your Amazon EC2 Spot Instance within an hour then you will not be charged.

  • However, if you choose to stop or terminate your newly launched Spot Instances by yourself, you will have to pay for the total number of seconds you have used.

Architecture Diagram

Task Details

  1. Log into AWS Management Console.

  2. Select an Amazon Linux Spot Instance from an Amazon Linux AMI 2.

  3. Setting the price of a spot instance to Higher and lower values compared to a given value.

  4. Launch the Spot Instance, to understand the difference between higher and lower prices.

  5. Explore the Spot request, Saving Summary, and Pricing history options.

  6. Test HTML page is launched or not using public IP.

  7. Validation of the lab

  8. Deleting AWS Resources