AWS Certified DevOps Engineer - Professional Exam: Troubleshooting Auto Scaling Group and Application Load Balancer

Troubleshooting Auto Scaling Group and Application Load Balancer

Prev Question Next Question

Question

An application is deployed in an Auto Scaling group with an Application Load Balancer.

One day, you updated the AMI ID used by the ASG and increased the desired number of instances.

However, you found that the new instance failed the health check of the ALB target group and was terminated by the Auto Scaling group.

Then the ASG recreated a new instance which would be terminated again after some time.

You want to isolate one of the new instances for troubleshooting and this instance must be in service for at least one day.

Which of the following methods can achieve the requirement? (SelectTWO.)

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D. E.

Correct Answers: B and C.

Option A is incorrect because the new instance will be recreated with the previous AMI ID.

There will be no instances with the new AMI for you to troubleshoot the issue.

Option B is CORRECT because after you disable the ELB health check in the ASG configuration, the new instance will not be terminated by the ASG and is available for further troubleshooting.

Option C is CORRECT because after the instance is put in the Standby state, the instance does not belong to the ELB target group or ASG so that it will not be terminated.

Option D is incorrect because the default timeout of lifecycle hook is 1 hour.

After the timeout, the instance will become unhealthy in the Auto Scaling group and be terminated.

Option E is incorrect because this method cannot isolate a new instance for you to debug the issue.

Reference:

https://docs.aws.amazon.com/autoscaling/ec2/userguide/healthcheck.html, https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-enter-exit-standby.html

The issue is that the new instances are failing the health check of the Application Load Balancer (ALB) and are being terminated by the Auto Scaling group (ASG). To troubleshoot the issue, the question asks for two methods to isolate one of the new instances for at least one day. Let's examine each answer option:

A. Modify the AMI ID to the previous one in the launch template of the Auto Scaling group. This option would revert the ASG back to the previous AMI, which could solve the health check issue. However, it does not isolate an instance for troubleshooting and it does not guarantee that the issue will not occur again when using the new AMI.

B. In the ASG health check configuration, disable the health check provided by Elastic Load Balancing (ELB). This option would disable the ALB health check, allowing the instances to remain in service even if they fail the health check. However, it would not solve the underlying issue causing the failed health checks, and it could potentially allow unhealthy instances to remain in service.

C. Put the instance in the Standby state to temporarily remove it from the Auto Scaling group. This option would temporarily remove the instance from the ASG, allowing it to remain in service without being terminated. However, it would not guarantee that the instance remains in service for at least one day, as it could be terminated if the ASG scales down or if the instance fails the health check again when it is put back in service.

D. Put the instance in the Pending:Wait state for 24 hours by adding a lifecycle hook with the default timeout. This option would add a lifecycle hook to the ASG, which would pause the instance in the Pending:Wait state before terminating it. This would allow the instance to remain in service for at least 24 hours before it is terminated. However, this option requires additional configuration and does not address the underlying issue causing the failed health checks.

E. Decrease the desired number of the instances in the Auto Scaling group. This option would reduce the number of instances in the ASG, which could temporarily reduce the load on the ALB and allow the remaining instances to pass the health check. However, it does not isolate an instance for troubleshooting and it does not guarantee that the issue will not occur again when the desired number of instances is increased.

Therefore, the two best options to achieve the requirement of isolating an instance for troubleshooting while ensuring it remains in service for at least one day are A and D. Option A would revert the ASG back to the previous AMI, which could solve the health check issue, while option D would add a lifecycle hook to pause the instance in the Pending:Wait state before terminating it, allowing it to remain in service for at least 24 hours.