Increase the Auto Scaling health check grace period for slow-starting instances
Short answer
D Increase the health check grace period on the Auto Scaling group so instances can finish downloading content before health checks apply.
Question
Key Takeaways
The health check grace period tells the Auto Scaling group to wait a set number of seconds after an instance comes into service before the load balancer health checks can mark it unhealthy, which covers the boot window without touching the scripts.
Instances behind an Application Load Balancer are terminated in a loop because the load balancer health check fails before the user data script finishes downloading a large amount of critical content from S3. The user data scripts must not be changed in production.
Common mistake: Increasing the health check timeout or changing the health check path. The load balancer timeout cannot be set below the interval the group uses to evaluate health, and changing the path alters what is being probed rather than granting the instance more startup time, so the loop persists.
Expert Analysis
Why the Answer Is Correct
The Auto Scaling health check grace period is the documented control for exactly this situation. Until the grace period elapses, the Auto Scaling group does not act on load balancer health check results, so instances that need longer than the default window to download content from S3 and become healthy are not terminated. The instances launch successfully, the application becomes healthy, and then the load balancer starts including them, all without modifying the user data scripts the company asked not to touch.
Why the Other Options Are Wrong
A: A larger instance does not shorten the time needed to download a large amount of content over the network, so the health check still fails during startup. B: The health check timeout controls how long the load balancer waits for a response, not how long the Auto Scaling group tolerates a booting instance, and it cannot be set below the health check interval. C: Changing the health check path changes what the load balancer probes, and if the probe already succeeded the problem would not occur, so this does not address the startup timing.
Community Comment Notes
The community voted 90 to 1 for D. Commenters linked the Auto Scaling documentation for the health check grace period and explained that it gives instances time to finish user data scripts before health check results are acted upon, which is precisely the reported symptom after the S3 bucket grew.
Official Reference
https://docs.aws.amazon.com/autoscaling/ec2/userguide/health-check-grace-period.html
This link opens the official vendor documentation in a new tab.
Community Votes
100% of anonymous learners picked answer D. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 6 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 6
-
ebbff63 👍 9 Answered DD. Increase the health check grace period
-
AhmedSalem 👍 7 Answered DAnswer D. Extending the grace period allows the instances more time to complete their startup tasks, including downloading the additional content from S3, before health checks start. This solution does not require altering the user data scripts in production, which aligns with the company’s requirements.
-
liuliangzhou 👍 2 Answered BI prefer B over D: The problem is that EC2 instances need to download content from S3 during the startup process, which may take some time. If ALB's health check is performed during this period and the EC2 instance is unable to respond to the health check request due to incomplete downloads, ALB may consider the instance unhealthy and remove it from the service. This may trigger the auto scaling group to start new instances, creating an endless loop.
-
AzureDP900 👍 1D is right. Since the EC2 instances are being terminated due to an ELB system health check failure, it's likely that the health checks are timing out while the user data scripts are still running and downloading content from S3. This causes the ALB to think the instance is unhealthy, leading to termination. By increasing the health check grace period for the Auto Scaling group, you give the instances more time to complete their startup process, including the execution of the user data scripts, before considering them healthy or unhealthy. This should prevent the endless loop of launching and terminating EC2 instances due to health check failures.
-
JoeTromundo 👍 1 Answered DCorrect answer: D - The grace period in Auto Scaling allows new instances time to finish initialization (like downloading data or running user scripts) before health checks start. By increasing this grace period, you provide more time for the EC2 instances to complete the startup process and avoid premature termination. Incorrect answer: B - This only extends the time the ALB waits for a response on a health check, but if the EC2 instance isn't ready to serve requests due to its long initialization time, it will still fail the health check.
Show 1 more comment
-
nimbus_00 👍 1 Answered Dhttps://docs.aws.amazon.com/autoscaling/ec2/userguide/health-check-grace-period.html#:~:text=In%20the%20console%2C%20by%20default,the%20health%20check%20grace%20period.
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All SAP-C02 Questions
Access 85 questions with complete answers and detailed explanations.
View Full SAP-C02 Practice Test →