PrepAway - Latest Free Exam Questions & Answers

What will Auto Scaling do in this scenario?

A user has configured Auto Scaling with the minimum capacity as 2 and the desired capacity as 2. The user is
trying to terminate one of the existing instance with the command:
as-terminate-instance-in-auto-scaling-group<Instance ID> –decrement-desired-capacity
What will Auto Scaling do in this scenario?

PrepAway - Latest Free Exam Questions & Answers

A.
Terminates the instance and does not launch a new instance

B.
Terminates the instance and updates the desired capacity to 1

C.
Terminates the instance and updates the desired capacity and minimum size to 1

D.
Throws an error

Explanation:
The Auto Scaling command as-terminate-instance-in-auto-scaling-group <Instance ID> will terminate the
specific instance ID. The user is required to specify the parameter as –decrement-desired-capacity. Then Auto
Scaling will terminate the instance and decrease the desired capacity by 1. In this case since the minimum size
is 2, Auto Scaling will not allow the desired capacity to go below 2. Thus, it will throw an error.

8 Comments on “What will Auto Scaling do in this scenario?

  1. Gig says:

    D. Throws an error because minimum capacity is 2 and it’s already at minimum capacity so it can not terminate any instances.




    0



    0
  2. Yogi says:

    Just tested, [D] is a correct answer.

    # aws autoscaling terminate-instance-in-auto-scaling-group –instance-id i-12345 –should-decrement-desired-capacity

    An error occurred (ValidationError) when calling the TerminateInstanceInAutoScalingGroup operation: Currently, desiredSize equals minSize (2). Terminating instance without replacement will violate group’s min size constraint. Either set shouldDecrementDesiredCapacity flag to false or lower group’s min size.




    0



    0

Leave a Reply

Your email address will not be published. Required fields are marked *