Courseiva
Incident and Event Response →mediumMultiple Choice

DOP-C02 Incident and Event Response Practice Question

After deploying a new application version using AWS CodeDeploy, an EC2 instance fails the deployment. The deployment group is configured with an in-place deployment. The engineer sees the error 'ScriptMissing' in the CodeDeploy logs. What should the engineer check?

⚠ Common exam trap

DOP-C02 often tests whether candidates can distinguish configuration-level causes (deployment config, security groups, AMI) from the actual appspec-driven cause of a specific lifecycle error like ScriptMissing.

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 file path defined in the appspec.yml for the lifecycle hook

The 'ScriptMissing' error in CodeDeploy indicates that a lifecycle hook script referenced in appspec.yml cannot be found at the specified path on the instance. The engineer should verify the file path defined for that hook in appspec.yml.

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 deployment group's deployment configuration

    Why it's wrong here

    The deployment configuration determines the overall deployment strategy, such as the number of instances to update at once, the interval between updates, and the failure thresholds that trigger a rollback. It does not reference, validate, or execute any script files, so it cannot be the cause of a 'ScriptMissing' error. Modifying the deployment configuration might affect how quickly an instance is marked failed, but the underlying symptom would still be an invalid script path in appspec.yml.

  • ✓

    The file path defined in the appspec.yml for the lifecycle hook

    Why this is correct

    The appspec.yml file is the deployment specification that maps each lifecycle hook (e.g., BeforeInstall, AfterInstall, ApplicationStart) to a script path. The 'ScriptMissing' error occurs precisely when the CodeDeploy agent attempts to execute the script declared in a hook and finds no file at that path, either because the path is mistyped, uses an incorrect relative reference, or the script file was omitted from the deployment revision. Since the agent only knows script locations from appspec.yml, an incorrect path there is the direct and immediate cause of this error, making this option correct.

  • ✗

    The security group attached to the instance

    Why it's wrong here

    Security groups act as a virtual firewall for the EC2 instance, controlling inbound and outbound network traffic based on protocols, ports, and CIDR ranges. They have no bearing on local filesystem operations, file existence, or process execution, so they cannot trigger a 'ScriptMissing' error. While a misconfigured security group could block the CodeDeploy agent from reaching the service or prevent the deployment from being downloaded, the 'ScriptMissing' symptom occurs after the revision is already on the instance and the agent is running lifecycle scripts from local storage.

  • ✗

    The AMI used for the EC2 instance

    Why it's wrong here

    An Amazon Machine Image (AMI) defines the base operating system, kernel, and preinstalled packages for the instance, but it does not influence the contents of the application revision being deployed. The 'ScriptMissing' error indicates that a script referenced in appspec.yml is absent from the revision's file tree, which is unrelated to the AMI's configuration. Even if the AMI lacked a required runtime or interpreter, the failure would manifest later as 'ScriptFailed' or 'ScriptHang', not as a missing script file, because the agent would still be able to find the script to attempt execution.

About these practice questions

Courseiva writes every DOP-C02 question from scratch — 1,298 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 and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Amazon Web Services exam blueprint

This DOP-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 DOP-C02 exam.