Courseiva
Continuous Improvement for Existing SolutionshardMultiple SelectObjective-mapped

SAP-C02 Continuous Improvement for Existing Solutions Practice Question

A company is using AWS CodePipeline to automate deployments of a web application. The pipeline includes a build stage using AWS CodeBuild and a deploy stage using AWS CodeDeploy to an Auto Scaling group. Recently, deployments have been failing during the deploy stage with an error indicating that the target instances are not in a healthy state. The CodeDeploy agent logs show that the agent is running but the application validation scripts are failing. Which THREE actions should the solutions architect take to troubleshoot and resolve the issue?

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

Test the validation script manually on a healthy instance to confirm it works as expected.

Options A, C, and D are correct. Checking AppSpec hooks ensures the validation scripts are correctly defined. Reviewing CodeDeploy agent logs helps identify script failures. Testing the validation script manually on a healthy instance verifies its functionality. Option B is wrong because increasing the deployment timeout does not fix the script failure. Option E is wrong because CodeDeploy does not use Auto Scaling lifecycle hooks for instance health; it uses its own deployment lifecycle.

Answer analysis

Option-by-option breakdown

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

  • Test the validation script manually on a healthy instance to confirm it works as expected.

    Why this is correct

    Manual testing helps isolate whether the script itself is faulty.

  • Increase the deployment timeout in the CodeDeploy deployment group to allow more time for validation.

    Why it's wrong here

    Timeout increase may mask the issue but does not resolve the root cause.

  • Review the CodeDeploy agent logs on a failing instance to identify the specific error in the validation script.

    Why this is correct

    Logs provide details on why the validation script failed.

  • Verify that the AppSpec file includes the correct lifecycle event hooks (e.g., ValidateService).

    Why this is correct

    The ValidateService hook runs validation scripts; if misconfigured, the deployment fails.

  • Configure an Auto Scaling lifecycle hook to perform health checks before the instance is placed in service.

    Why it's wrong here

    Lifecycle hooks are for custom actions during scale-out/scale-in, not for CodeDeploy validation.

Visual reference

Client Recursive Resolver Root DNS (13 root servers) TLD DNS (.com, .org, …) Authoritative example.com query IP addr answer

About these practice questions

One of 1,660 original SAP-C02 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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 SAP-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 SAP-C02 exam.