Courseiva
mediumMultiple ChoiceObjective-mapped

CV0-004 Practice Question: A cloud administrator launches a new EC2 instance…

Exhibit

Refer to the exhibit.
```
[cloud-init]
Output from: /var/log/cloud-init-output.log
...
2024-01-15 10:32:45,123 - util.py[WARNING]: Running module <module-name> (<module-path>) failed
...
```

A cloud administrator launches a new EC2 instance with a userdata script that installs a web server. The instance launches but the web server is not running. The administrator checks the cloud-init logs and sees the warning shown in the exhibit. What is the most likely cause?

⚠ Common exam trap

CompTIA often tests the misconception that security groups or IAM roles are the cause of application startup failures, but the trap here is that cloud-init warnings specifically point to script execution issues, not network or permission problems.

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

The userdata script contains a syntax error.

The warning in cloud-init logs indicates that the userdata script failed to execute, which most commonly occurs due to a syntax error in the script. Cloud-init processes userdata as a shell script by default, and any syntax error (e.g., missing quotes, incorrect commands) will cause the script to exit prematurely, preventing the web server from starting. The administrator confirmed the instance launched successfully, so the issue is isolated to the script execution, not infrastructure or permissions.

Answer analysis

Option-by-option breakdown

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

  • The userdata script contains a syntax error.

    Why this is correct

    Syntax errors cause cloud-init modules to fail.

  • The instance type does not have enough memory.

    Why it's wrong here

    Would not cause script failure.

  • The instance does not have an IAM role assigned.

    Why it's wrong here

    IAM role not needed for simple script.

  • The security group does not allow HTTP traffic.

    Why it's wrong here

    Does not prevent web server installation.

About these practice questions

Courseiva writes every CV0-004 question from scratch — 977 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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.