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 is for ALB/NLB, but the instance still gets terminated abruptly.
- ✗
Increase the cooldown period for the Auto Scaling group
Why it's wrong here
Cooldown delays further scaling but does not protect in-flight requests.
- ✗
Decrease the scale-in threshold to reduce the frequency of termination
Why it's wrong here
Reduces occurrences but does not prevent failures.
- ✓
Use lifecycle hooks to put the instance in a 'terminating:wait' state and complete request processing
Why this is correct
Lifecycle hooks allow graceful shutdown.
Go deeper
Related to this question
About these practice questions
This SAP-C02 question is part of Courseiva's 1,660-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.