AWS DevOps Engineer - Resolving Spot Instance Capacity Issues

Resolving Spot Instance Capacity Issues

Prev Question Next Question

Question

You are working in a start-up company as a DevOps engineer.

Due to limited budget, the frontend Auto Scaling group uses Spot Instances in the development environment.

Since last Monday, it has become more and more difficult to launch an instance.

The ASG reports the error "There is no Spot capacity available that matches your request"

Because of this, the frontend page cannot load.

You suggested to launch On-Demand Instances however your manager told you to continue using Spot Instances.

How would you resolve this problem?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Correct Answer : A.

Option A is CORRECT because you can select multiple instances types in the ASG configuration.

Picking less popular instance types will result in lower costs and fewer interruptions for Spot Instances.

Option B is incorrect because this option means that all instances in the ASG should be Spot Instances.

It does not fix the mentioned problem as the capacity issue still exists.

Option C is incorrect because with the “Lowest price” option, AWS launches the Spot Instances with the lowest price.

However, it does not resolve the capacity issue.

Option D is incorrect because the new launch template still does not fix the mentioned capacity issue of Spot Instances.

Reference:

https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-purchase-options.html, https://aws.amazon.com/premiumsupport/knowledge-center/ec2-spot-instance-insufficient-capacity/

The correct answer to this question is A. Specify several instance types in the Auto Scaling group that are appropriate for the application so that you can get more compute capacity when you have instance type flexibility.

The reason behind this is that when there is limited Spot Instance capacity, it is important to have flexibility in the instance types that the Auto Scaling group can launch. By specifying several instance types in the Auto Scaling group, there is a higher chance that at least one of them will have available capacity for Spot Instances.

Option B, modifying the instance distribution to be 100% Spot, is not a good solution because it completely removes the possibility of launching On-Demand Instances, which could be necessary in case of no available Spot Instances.

Option C, choosing the "Lowest price" allocation strategy, can help in getting the cheapest available Spot Instances but it does not necessarily solve the problem of limited Spot Instance capacity.

Option D, creating a new Launch Template that specifies only Spot Instances, does not address the problem of limited Spot Instance capacity. Instead, it limits the Auto Scaling group to only launch Spot Instances, which could make the situation worse if there is no Spot Instance capacity available.

Therefore, the best solution is to have flexibility in instance types by specifying several appropriate instance types in the Auto Scaling group. This increases the chances of getting available Spot Instances when there is limited capacity.