AWS Certified Solutions Architect – Professional (SAP-C02) — Question 486
A company hosts an application that uses several Amazon EC2 instances in an Auto Scaling group behind an Application Load Balancer (ALB). During the initial startup of the EC2 instances, the EC2 instances run user data scripts to download critical content for the application from an Amazon S3 bucket.
The EC2 instances are launching correctly. However, after a period of time, the EC2 instances are terminated with the following error message: “An instance was taken out of service in response to an ELB system health check failure.” EC2 instances continue to launch and be terminated because of Auto Scaling events in an endless loop.
The only recent change to the deployment is that the company added a large amount of critical content to the S3 bucket. The company does not want to alter the user data scripts in production.
What should a solutions architect do so that the production environment can deploy successfully?
Answer options
- A. Increase the size of the EC2 instances.
- B. Increase the health check timeout for the ALB.
- C. Change the health check path for the ALB.
- D. Increase the health check grace period for the Auto Scaling group.
Correct answer: D
Explanation
Because the S3 bucket now contains a larger amount of content, the user data script takes longer to complete, meaning the application is not yet ready to respond to health checks when the default grace period ends. Increasing the health check grace period gives the EC2 instances sufficient time to finish downloading the critical content and start the application before the Auto Scaling group begins monitoring their health status. Other solutions, such as increasing the ALB timeout or changing the health check path, do not address the fundamental delay in the application becoming operational during boot.