Courseiva
Operations and Support →hardMultiple Choice

CV0-004 Operations and Support Practice Question

A cloud engineer is configuring an auto-scaling group with a lifecycle hook to run a custom script when instances are launched. The script installs software and registers the instance with a load balancer. The engineer wants to ensure the instance does not receive traffic until the script completes successfully. What should the engineer do?

⚠ Common exam trap

CV0-004 often tests the misconception that user data or health checks can delay traffic until a script completes; candidates must remember that lifecycle hooks with 'pending:wait' and explicit 'complete-lifecycle-action' signals are required to pause the instance launch process.

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 a lifecycle hook with a 'pending:wait' state and then send a 'complete-lifecycle-action' signal after the script succeeds.

Using a lifecycle hook with a 'pending:wait' state allows you to pause the instance launch process until the custom script completes. After the script succeeds, you send a 'complete-lifecycle-action' signal to the auto-scaling group, which then proceeds to put the instance into service. This ensures the instance does not receive traffic until the script is done.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Set the lifecycle hook to 'terminating:wait' to delay termination.

    Why it's wrong here

    A terminating:wait hook pauses instance termination, not launch, so it cannot delay traffic until the install script finishes. Terminating hooks are correct when draining connections or copying logs before an instance is removed from service.

  • ✓

    Use a lifecycle hook with a 'pending:wait' state and then send a 'complete-lifecycle-action' signal after the script succeeds.

    Why this is correct

    The pending:wait lifecycle state holds the instance in service-pending until the script signals complete-lifecycle-action, so the load balancer never routes traffic to an unconfigured instance. This satisfies the constraint that traffic must wait for successful script completion.

  • ✗

    Configure the load balancer health check to fail until the script runs.

    Why it's wrong here

    Health checks only gate load balancer routing; they do not hold the instance in a pending state while the script runs, so the instance can still be registered and receive traffic. Failing health checks suits detecting unhealthy backends, not sequencing launch-time configuration.

  • ✗

    Configure the launch configuration with a user-data script that runs after the instance is in service.

    Why it's wrong here

    User data runs during boot, but the option places it after the instance is in service, so the load balancer can route traffic before software installation completes. User data suits bootstrapping at launch, not enforcing a post-script traffic gate.

About these practice questions

This CV0-004 question is part of Courseiva's 834-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 →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official CompTIA exam blueprint

This CV0-004 practice question is part of Courseiva's free CompTIA 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 CV0-004 exam.