SOA-C02 Practice Question: Auto Scaling lifecycle hooks to complete…
An Auto Scaling group launches new EC2 instances when CPU exceeds 70 percent. The instances take 4 minutes to bootstrap (install software, register with a service discovery system, and warm up caches). Without a hook, the load balancer routes traffic to new instances before they are ready, causing 503 errors. What is the correct solution?
⚠ Common exam trap
Test-takers frequently confuse the health check grace period (which only delays health checks, not registration) with lifecycle hooks (which actually control when the instance becomes available to the load balancer).
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Add a lifecycle hook on the autoscaling:EC2_INSTANCE_LAUNCHING transition; signal CompleteLifecycleAction(CONTINUE) when bootstrap finishes
Lifecycle hooks allow the Auto Scaling group to pause instance launch until a custom action (e.g., bootstrap completion) is finished. By adding a hook on the autoscaling:EC2_INSTANCE_LAUNCHING transition, the instance is held in a 'pending:wait' state. Once the bootstrap script calls CompleteLifecycleAction with the CONTINUE result, the instance transitions to 'InService' and can then be registered with the load balancer, preventing premature traffic and 503 errors.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Add a lifecycle hook on the autoscaling:EC2_INSTANCE_LAUNCHING transition; signal CompleteLifecycleAction(CONTINUE) when bootstrap finishes
Why this is correct
The hook holds the instance in Pending:Wait, outside the target group, until the signal arrives. The load balancer never routes traffic to the instance during its Pending:Wait phase. After the CONTINUE signal, the instance enters InService and the load balancer registers it normally. The heartbeat timeout (default 1 hour, configurable) should exceed the bootstrap time.
- ✗
Increase the load balancer health check grace period to 10 minutes to give instances time to bootstrap
Why it's wrong here
The health check grace period tells the Auto Scaling group how long to wait before checking the health of a newly launched instance. It does not prevent the load balancer from routing traffic to the instance — the instance joins the target group immediately at launch. A 503 during the grace period is still visible to users.
- ✗
Increase the warm-up time in the Auto Scaling group's instance refresh configuration
Why it's wrong here
Instance refresh warm-up controls how long Auto Scaling waits before updating the next batch during a rolling refresh. It does not hold instances out of the load balancer target group during normal scale-out launches. Lifecycle hooks are the correct mechanism for gating entry to InService.
- ✗
Use a weighted target group with 0 weight for new instances until they are confirmed healthy
Why it's wrong here
Target group weights affect what percentage of traffic is directed to a given target group — they are used for blue/green deployments between groups. Individual instance weights within a target group cannot be set to zero through standard ALB configuration.
Go deeper
Related to this question
About these practice questions
One of 1,169 original SOA-C02 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This SOA-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SOA-C02 exam.