Amazon EC2 | Spot Instances Flashcards

1
Q

Do I have to pay for Premium Support when purchasing Reserved Instances from the Reserved Instance Marketplace?

Spot Instances

Amazon EC2 | Compute

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a Spot Instance?

Spot Instances

Amazon EC2 | Compute

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How is a Spot instance different than an On-Demand instance or Reserved Instance?

Spot Instances

Amazon EC2 | Compute

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How do I purchase and start up a Spot instance?

Spot Instances

Amazon EC2 | Compute

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How many Spot instances can I request?

Spot Instances

Amazon EC2 | Compute

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What price will I pay for a Spot instance?

Spot Instances

Amazon EC2 | Compute

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a Spot capacity pool?

Spot Instances

Amazon EC2 | Compute

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the best practices to use Spot instances?

Spot Instances

Amazon EC2 | Compute

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How can I determine the status of my Spot request?

Spot Instances

Amazon EC2 | Compute

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Are Spot instances available for all instance families and sizes and in all regions?

Spot Instances

Amazon EC2 | Compute

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Which operating systems are available as Spot instances?

Spot Instances

Amazon EC2 | Compute

A

Linux/UNIX and Windows Server are available. Windows Server with SQL Server is not currently available.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

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

A

Not at this time.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

When would my Spot instance get interrupted?

Spot Instances

Amazon EC2 | Compute

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What happens to my Spot instance when it gets interrupted?

Spot Instances

Amazon EC2 | Compute

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the difference between Stop and Hibernate interruption behaviors?

Spot Instances

Amazon EC2 | Compute

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What if my EBS root volume is not large enough to store memory state (RAM) for Hibernate?

Spot Instances

Amazon EC2 | Compute

A

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.

17
Q

What is the benefit if Spot hibernates my instance on interruption?

Spot Instances

Amazon EC2 | Compute

A

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.

18
Q

What do I need to do to enable hibernation for my Spot instances?

Spot Instances

Amazon EC2 | Compute

A

Refer to Spot Hibernation to learn about enabling hibernation for your Spot instances.

19
Q

Do I have to pay for hibernating my Spot instance?

Spot Instances

Amazon EC2 | Compute

A

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.

20
Q

Can I restart a stopped instance or resume a hibernated instance?

Spot Instances

Amazon EC2 | Compute

A

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.

21
Q

Which instances and operating systems support hibernation?

Spot Instances

Amazon EC2 | Compute

A

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.

22
Q

How will I be charged if my Spot instance is interrupted?

Spot Instances

Amazon EC2 | Compute

A

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.

23
Q

How am I charged if Spot price changes while my instance is running?

Spot Instances

Amazon EC2 | Compute

A

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.

24
Q

Where can I see my usage history for Spot instances and see how much I was billed?

Spot Instances

Amazon EC2 | Compute

A

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.

25
Q

Are Spot blocks (Fixed Duration Spot instances) ever interrupted?

Spot Instances

Amazon EC2 | Compute

A

Spot blocks are designed not to be interrupted and will run continuously for the duration you select, independent of Spot market price. In rare situations, Spot blocks may be interrupted due to AWS capacity needs. In these cases, we will provide a two-minute warning before we terminate your instance (termination notice), and you will not be charged for the affected instance(s).

26
Q

What is a Spot fleet?

Spot Instances

Amazon EC2 | Compute

A

A Spot Fleet allows you to automatically request and manage multiple Spot instances that provide the lowest price per unit of capacity for your cluster or application, like a batch processing job, a Hadoop workflow, or an HPC grid computing job. You can include the instance types that your application can use. You define a target capacity based on your application needs (in units including instances, vCPUs, memory, storage, or network throughput) and update the target capacity after the fleet is launched. Spot fleets enable you to launch and maintain the target capacity, and to automatically request resources to replace any that are disrupted or manually terminated. Learn more about Spot fleets.

27
Q

Is there any additional charge for making Spot Fleet requests

Spot Instances

Amazon EC2 | Compute

A

No, there is no additional charge for Spot Fleet requests.

28
Q

What limits apply to a Spot Fleet request?

Spot Instances

Amazon EC2 | Compute

A

Visit the Spot Fleet Limits section of the Amazon EC2 User Guide to learn about the limits that apply to your Spot Fleet request.

29
Q

What happens if my Spot Fleet request tries to launch Spot instances but exceeds my regional Spot request limit?

Spot Instances

Amazon EC2 | Compute

A

If your Spot Fleet request exceeds your regional Spot instance request limit, individual Spot instance requests will fail with a Spot request limit exceeded request status. Your Spot Fleet request’s history will show any Spot request limit errors that the Fleet request received. Visit the Monitoring Your Spot Fleet section of the Amazon EC2 User Guide to learn how to describe your Spot Fleet request’s history.

30
Q

Are Spot fleet requests guaranteed to be fulfilled?

Spot Instances

Amazon EC2 | Compute

A

No. Spot fleet requests allow you to place multiple Spot instance requests simultaneously, and are subject to the same availability and prices as a single Spot instance request. For example, if no resources are available for the instance types listed in your Spot Fleet request, we may be unable to fulfill your request partially or in full. We recommend you to include all the possible instance types and availability zones that are suitable for your workloads in the Spot Fleet.

31
Q

Can I submit a multi-Availability Zone Spot Fleet request?

Spot Instances

Amazon EC2 | Compute

A

Yes, visit the Spot Fleet Examples section of the Amazon EC2 User Guide to learn how to submit a multi-Availability Zone Spot Fleet request.

32
Q

Can I submit a multi-region Spot Fleet request?

Spot Instances

Amazon EC2 | Compute

A

No, we do not support multi-region Fleet requests.

33
Q

How does Spot Fleet allocate resources across the various Spot instance pools specified in the launch specifications?

Spot Instances

Amazon EC2 | Compute

A

The RequestSpotFleet API provides two allocation strategies: lowestPrice and diversified. The lowestPrice strategy allows you to provision your Spot Fleet resources in instance pools that provide the lowest price per unit of capacity at the time of the request. The diversified strategy allows you to provision your Spot Fleet resources across multiple Spot instance pools. This enables you to maintain your fleet’s target capacity and increase your application’s availability as Spot capacity fluctuates.

Running your application’s resources across diverse Spot instance pools also allows you to further reduce your fleet’s operating costs over time. Visit the Amazon EC2 User Guide to learn more.

34
Q

Can I tag a Spot Fleet request?

Spot Instances

Amazon EC2 | Compute

A

You can request to launch Spot instances with tags via Spot Fleet. The Fleet by itself cannot be tagged.

35
Q

How can I see which Spot fleet owns my Spot instances?

Spot Instances

Amazon EC2 | Compute

A

You can identify the Spot instances associated with your Spot Fleet by describing your fleet request. Fleet requests are available for 48 hours after all its Spot instances have been terminated. See the Amazon EC2 User Guide to learn how to describe your Spot Fleet request.

36
Q

Can I modify my Spot Fleet request?

Spot Instances

Amazon EC2 | Compute

A

Yes, you can modify the target capacity of your Spot Fleet request. You may need to cancel the request and submit a new one to change other request configuration parameters.

37
Q

Can I specify a different AMI for each instance type that I want to use?

Spot Instances

Amazon EC2 | Compute

A

Yes, simply specify the AMI you’d like to use in each launch specification you provide in your Spot Fleet request.

38
Q

Can I use Spot Fleet with Elastic Load Balancing, Auto Scaling, or Elastic MapReduce?

Spot Instances

Amazon EC2 | Compute

A

You can use Auto Scaling features with Spot Fleet such as target tracking, health checks, cloudwatch metrics etc and can attach instances to your Elastic load balancers (both classic and application load balancers). Elastic MapReduce has a feature named “Instance fleets” that provides capabilities similar to Spot Fleet.

39
Q

Does a Spot Fleet request terminate Spot instances when they are no longer running in the lowest priced Spot pools and relaunch them in the lowest priced pools?

Spot Instances

Amazon EC2 | Compute

A

No, Spot Fleet requests do not automatically terminate and re-launch instances while they are running. However, if you terminate a Spot instance, Spot Fleet will replenish it with a new Spot instance in the new lowest priced pool.