Courseiva
Continuous Improvement for Existing SolutionshardMultiple ChoiceObjective-mapped

SAP-C02 Continuous Improvement for Existing Solutions Practice Question

A company uses AWS CodePipeline to deploy a microservices application to Amazon ECS. Recently, a deployment failed because the new task definition referenced an ECR image that did not exist. The team wants to prevent this type of failure in the future. Which action should be taken?

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

Add a validation step in CodePipeline to run a task definition dry-run.

Adding a validation step in CodePipeline that runs a task definition dry-run can verify the referenced ECR image exists before deployment, preventing failures. Option A is wrong because ECR scan on push only checks for vulnerabilities, not image existence. Option B is wrong because ECR lifecycle policies manage image retention, not validation. Option D is wrong because CloudTrail logs API calls but does not prevent deployment failures.

Answer analysis

Option-by-option breakdown

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

  • Configure ECR scan on push to verify image integrity.

    Why it's wrong here

    Scan on push checks for vulnerabilities, not image existence.

  • Add an ECR lifecycle policy to expire old images.

    Why it's wrong here

    Lifecycle policies manage image retention, not deployment validation.

  • Add a validation step in CodePipeline to run a task definition dry-run.

    Why this is correct

    Dry-run validates that the image exists and the task definition is valid before deployment.

  • Enable AWS CloudTrail to log ECR API calls.

    Why it's wrong here

    Logging does not prevent deployment failures.

About these practice questions

Courseiva writes every SAP-C02 question from scratch — 1,660 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 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.