Amazon EC2 | Spot Instances Flashcards
Do I have to pay for Premium Support when purchasing Reserved Instances from the Reserved Instance Marketplace?
Spot Instances
Amazon EC2 | Compute
Yes, if you are a Premium Support customer, you will be charged for Premium Support when you purchase a Reserved Instance through the Reserved Instance Marketplace.
What is a Spot Instance?
Spot Instances
Amazon EC2 | Compute
Spot instances are spare EC2 capacity that can save you up 90% off of On-Demand prices that AWS can interrupt with a 2-minute notification. Spot uses the same underlying EC2 instances as On-Demand and Reserved Instances, and is best suited for fault-tolerant, flexible workloads. Spot instances provides an additional option for obtaining compute capacity and can be used along with On-Demand and Reserved Instances.
How is a Spot instance different than an On-Demand instance or Reserved Instance?
Spot Instances
Amazon EC2 | Compute
While running, Spot instances are exactly the same as On-Demand or Reserved instances. The main differences are that Spot instances typically offer a significant discount off the On-Demand prices, your instances can be interrupted by Amazon EC2 for capacity requirements with a 2-minute notification, and Spot prices adjust gradually based on long term supply and demand for spare EC2 capacity.
See here for more details on Spot instances.
How do I purchase and start up a Spot instance?
Spot Instances
Amazon EC2 | Compute
Spot instances can be launched using the same tools you use launch instances today, including AWS Management Console, Auto-Scaling Groups, Run Instances and Spot Fleet. In addition many AWS services support launching Spot instances such as EMR, ECS, Datapipeline, Cloudformation and Batch.
To start up a Spot instance, you simply need to choose a Launch Template and the number of instances you would like to request.
See here for more details on how to request Spot instances.
How many Spot instances can I request?
Spot Instances
Amazon EC2 | Compute
You can request Spot instances up to your Spot limit for each region. Note that customers new to AWS might start with a lower limit. To learn more about Spot instance limits, please refer to the Amazon EC2 User Guide.
If you would like a higher limit, complete the Amazon EC2 instance request form with your use case and your instance increase will be considered. Limit increases are tied to the region they were requested for.
What price will I pay for a Spot instance?
Spot Instances
Amazon EC2 | Compute
You pay the Spot price that’s in effect at the beginning of each instance-hour for your running instance. If Spot price changes after you launch the instance, the new price is charged against the instance usage for the subsequent hour.
What is a Spot capacity pool?
Spot Instances
Amazon EC2 | Compute
A Spot capacity pool is a set of unused EC2 instances with the same instance type, operating system, Availability Zone, and network platform (EC2-Classic or EC2-VPC). Each spot capacity pool can have a different price based on supply and demand.
What are the best practices to use Spot instances?
Spot Instances
Amazon EC2 | Compute
We highly recommend using multiple Spot capacity pools to maximize the amount of Spot capacity available to you. EC2 provides built-in automation to find the most cost-effective capacity across multiple Spot capacity pools using Spot Fleet. For more information, please see Spot Best Practices.
How can I determine the status of my Spot request?
Spot Instances
Amazon EC2 | Compute
You can determine the status of your Spot request via Spot Request Status code and message. You can access Spot Request Status information on the Spot Instance page of the EC2 console of the AWS Management Console, API and CLI. For more information, please visit the Amazon EC2 Developer guide.
Are Spot instances available for all instance families and sizes and in all regions?
Spot Instances
Amazon EC2 | Compute
Spot instances are available in all public AWS regions. Spot is available for nearly all EC2 instance families and sizes, including the newest compute-optimized instances, accelerated graphics, FPGA and the new bare-metal instance types. A full list of instance types supported in each region are listed here.
Which operating systems are available as Spot instances?
Spot Instances
Amazon EC2 | Compute
Linux/UNIX and Windows Server are available. Windows Server with SQL Server is not currently available.
Can I use a Spot instance with a paid AMI for third-party software (such as IBM’s software packages)?
Spot Instances
Amazon EC2 | Compute
Not at this time.
When would my Spot instance get interrupted?
Spot Instances
Amazon EC2 | Compute
Over the last 3 months, 92% of Spot instance interruptions were from a customer manually terminating the instance because the application had completed its work.
In the circumstance EC2 needs to reclaim your Spot instance it can be for two possible reasons, with the primary one being Amazon EC2 capacity requirements (e.g. On Demand or Reserved Instance usage). Secondarily, if you have chosen to set a “maximum Spot price” and the Spot price rises above this, your instance will be reclaimed with a two-minute notification. This parameter determines the maximum price you would be willing to pay for a Spot instance hour, and by default, is set at the On-Demand price. As before, you continue to pay the Spot market price, not your maximum price, at the time your instance was running, charged in per-second increments.
What happens to my Spot instance when it gets interrupted?
Spot Instances
Amazon EC2 | Compute
You can choose to have your Spot instances terminated, stopped or hibernated upon interruption. Stop and hibernate options are available for persistent Spot requests and Spot Fleets with the “maintain” option enabled. By default, your instances are terminated.
Refer to Spot Hibernation to learn more about handling interruptions.
What is the difference between Stop and Hibernate interruption behaviors?
Spot Instances
Amazon EC2 | Compute
In the case of Hibernate, your instance gets hibernated and the RAM data persisted. In the case of Stop, your instance gets shutdown and RAM is cleared.
In both the cases, data from your EBS root volume and any attached EBS data volumes is persisted. Your private IP address remains the same, as does your elastic IP address (if applicable). The network layer behavior will be similar to that of EC2 Stop-Start workflow. Stop and Hibernate are available for Amazon EBS backed instances only. Local instance storage is not persisted.
What if my EBS root volume is not large enough to store memory state (RAM) for Hibernate?
Spot Instances
Amazon EC2 | Compute
You should have sufficient space available on your EBS root volume to write data from memory. If the EBS root volume does not enough space, hibernation will fail and the instance will get shutdown instead. Ensure that your EBS volume is large enough to persist memory data before choosing the hibernate option.
What is the benefit if Spot hibernates my instance on interruption?
Spot Instances
Amazon EC2 | Compute
With hibernate, Spot instances will pause and resume around any interruptions so your workloads can pick up from exactly where they left off. You can use hibernation when your instance(s) need to retain instance state across shutdown-startup cycles, i.e. when your applications running on Spot depend on contextual, business, or session data stored in RAM.
What do I need to do to enable hibernation for my Spot instances?
Spot Instances
Amazon EC2 | Compute
Refer to Spot Hibernation to learn about enabling hibernation for your Spot instances.
Do I have to pay for hibernating my Spot instance?
Spot Instances
Amazon EC2 | Compute
There is no additional charge for hibernating your instance beyond the EBS storage costs and any other EC2 resources you may be using. You are not charged instance usage fees once your instance is hibernated.
Can I restart a stopped instance or resume a hibernated instance?
Spot Instances
Amazon EC2 | Compute
No, you will not be able to re-start a stopped instance or resume a hibernated instance directly. Stop-start and hibernate-resume cycles are controlled by Amazon EC2. If an instance is stopped or hibernated by Spot, it will be restarted or resumed by Amazon EC2 when the capacity becomes available.
Which instances and operating systems support hibernation?
Spot Instances
Amazon EC2 | Compute
Spot Hibernation is currently supported for Amazon Linux AMIs, Ubuntu and Microsoft Windows operating systems running on any instance type across C3, C4, C5, M4, M5, R3, R4 instances with memory (RAM) size less than 100 GiB.
To review the list of supported OS versions, refer to Spot Hibernation.
How will I be charged if my Spot instance is interrupted?
Spot Instances
Amazon EC2 | Compute
If your Spot instance is terminated or stopped by Amazon EC2 in the first instance hour, you will not be charged for that usage. However, if you terminate the instance yourself, you will be charged to the nearest second. If the Spot instance is terminated or stopped by Amazon EC2 in any subsequent hour, you will be charged for your usage to the nearest second. If you are running on Windows and you terminate the instance yourself, you will be charged for an entire hour.
How am I charged if Spot price changes while my instance is running?
Spot Instances
Amazon EC2 | Compute
You will pay the price per instance-hour set at the beginning of each instance-hour for the entire hour, billed to the nearest second.
Where can I see my usage history for Spot instances and see how much I was billed?
Spot Instances
Amazon EC2 | Compute
The AWS Management Console makes a detailed billing report available which shows Spot instance start and termination/stop times for all instances. Customers can check the billing report against historical Spot prices via the API to verify that the Spot price they were billed is correct.