Courseiva
Operations and SupporthardMultiple ChoiceObjective-mapped

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?

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.

Lifecycle hooks pause the instance launch process until you complete an action and notify the auto-scaling group to continue. By setting the hook to 'pending:wait', the instance remains in a pending state and does not become healthy until you send a 'complete-lifecycle-action' signal.

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

    Terminating hooks are for instance termination, not launch.

  • 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

    This pauses the instance in a pending state until the custom action completes, preventing traffic until ready.

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

    Why it's wrong here

    While this could work, it is not a best practice; lifecycle hooks provide a more reliable mechanism.

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

    Why it's wrong here

    User data scripts run after the instance starts, but the instance may be marked healthy and receive traffic before the script completes.

About these practice questions

This CV0-004 question is part of Courseiva's 977-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 by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

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.