DVA-C02 Deployment Practice Question
A company uses AWS CodeDeploy to deploy a web application to an Auto Scaling group. The deployment fails with a 'ScriptMissing' error. What is the most likely cause?
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 lifecycle event hook script referenced in appspec.yml is not present.
The 'ScriptMissing' error occurs when the appspec.yml file references a lifecycle event hook script that is not present in the application revision. CodeDeploy expects the script to exist at the specified path. Option A is incorrect: the deployment group can be configured for an Auto Scaling group, and that is not the cause of ScriptMissing. Option B is incorrect: buildspec.yml is used by AWS CodeBuild, not CodeDeploy. Option C is incorrect: while the application revision must be stored in S3 (or GitHub), the error is not about the bucket location but about a missing script within the revision.
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 is not configured for an Auto Scaling group.
Why it's wrong here
CodeDeploy fully supports deployment groups targeting Auto Scaling groups as a valid compute platform, so a missing ASG association would surface as a deployment-group configuration error, not the specific ScriptMissing error, which is tied to lifecycle hook scripts.
- ✗
The buildspec.yml file is missing from the application root.
Why it's wrong here
buildspec.yml is a CodeBuild artifact used to define build commands for the build stage of a pipeline, and CodeDeploy never reads or requires it; CodeDeploy exclusively reads appspec.yml, so this file's absence is unrelated to the ScriptMissing error.
- ✗
The application revision is not stored in an S3 bucket.
Why it's wrong here
CodeDeploy supports pulling the application revision from either Amazon S3 or a GitHub repository, so storage location alone is not a requirement for S3 specifically, and this would trigger a revision-retrieval failure rather than ScriptMissing.
- ✓
The lifecycle event hook script referenced in appspec.yml is not present.
Why this is correct
The ScriptMissing error occurs specifically when the appspec.yml file references a script under hooks (such as BeforeInstall or ApplicationStart) by filename, but that script file does not actually exist in the deployed revision bundle at the expected path, so the agent cannot locate it to execute.
Quick reference
AWS S3 Storage Class Comparison
| Storage Class | Min Duration | Retrieval | Use Case |
|---|---|---|---|
| S3 Standard | None | Immediate | Frequently accessed data |
| S3 Standard-IA | 30 days | Immediate | Infrequent access, rapid retrieval |
| S3 One Zone-IA | 30 days | Immediate | Non-critical infrequent data |
| S3 Intelligent-Tiering | None | Immediate–hours | Unknown or changing access patterns |
| S3 Glacier Instant | 90 days | Milliseconds | Archive with instant retrieval |
| S3 Glacier Flexible | 90 days | Minutes–hours | Archive, flexible retrieval |
| S3 Glacier Deep Archive | 180 days | Hours | Long-term compliance archive |
Go deeper
Related to this question
About these practice questions
Courseiva writes every DVA-C02 question from scratch — 1,135 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 →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This DVA-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 DVA-C02 exam.