SAP-C02 Continuous Improvement for Existing Solutions Practice Question
A company runs a stateful web application on EC2 instances in an Auto Scaling group. The application uses a shared EFS file system for persistent data. The operations team notices that during scale-in events, some requests fail because the instance is terminated while still processing. What is the BEST way to prevent request failures during scale-in?
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
✓
Use lifecycle hooks to put the instance in a 'terminating:wait' state and complete request processing
Lifecycle hooks allow the Auto Scaling group to put the instance in a 'terminating:wait' state, giving it time to complete processing existing requests before termination. Option A (Network Load Balancer with connection draining) can help drain new connections but does not ensure that in-flight requests are completed, especially for a stateful application using EFS. Option B (increase cooldown) only delays scaling decisions and does not prevent termination of an instance that is already processing. Option C (decrease scale-in threshold) reduces the frequency of scale-in events but does not prevent request failures when termination occurs.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Use a Network Load Balancer with connection draining enabled
Why it's wrong here
Connection draining applies to load balancer deregistration, not to Auto Scaling group termination, and a Network Load Balancer does not support connection draining. It tempts because draining preserves in-flight requests during deregistration, but the correct mechanism is an EC2 Auto Scaling lifecycle hook that pauses termination.
- ✗
Increase the cooldown period for the Auto Scaling group
Why it's wrong here
Cooldown delays subsequent scaling activities after a scaling event; it does not delay termination of an individual instance already draining work. It tempts because cooldown reduces scaling churn, but it suits stabilising rapid scaling loops, not letting in-flight requests finish before instance termination.
- ✗
Decrease the scale-in threshold to reduce the frequency of termination
Why it's wrong here
Lowering the scale-in threshold changes when scaling triggers, not how termination treats in-flight requests, so instances are still terminated mid-processing. It tempts because fewer terminations reduce exposure, but the actual fix is a lifecycle hook that holds the instance in Terminating:Wait until work completes.
- ✓
Use lifecycle hooks to put the instance in a 'terminating:wait' state and complete request processing
Why this is correct
Lifecycle hooks hold the instance in a terminating:wait state before Auto Scaling proceeds, letting in-flight requests finish and the EFS mount unmount cleanly. This directly satisfies the stem's constraint: preventing request failures when scale-in terminates an instance mid-processing. Complete the lifecycle action to release the instance.
Go deeper
Related to this question
About these practice questions
This SAP-C02 question is part of Courseiva's 984-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This SAP-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 SAP-C02 exam.