Courseiva
SDLC Automation →mediumMultiple Choice

DOP-C02 SDLC Automation Practice Question

A company uses AWS CodePipeline to deploy a web application to an Elastic Beanstalk environment. The pipeline has a source stage from CodeCommit, a build stage using CodeBuild, and a deploy stage to Elastic Beanstalk. Recently, deployments started failing with an error: 'The deployment failed because the Elastic Beanstalk environment is in an UPDATE_ROLLBACK_IN_PROGRESS state.' What is the MOST likely cause?

⚠ Common exam trap

Test-takers frequently confuse a deployment failure with a permissions or build configuration issue, but the specific error message about the environment state directly points to a prior failed deployment and rollback as the root 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

✓

A previous deployment failed and triggered an automatic rollback, leaving the environment in an unstable state

The error indicates the Elastic Beanstalk environment is stuck in an UPDATE_ROLLBACK_IN_PROGRESS state, which occurs when a previous deployment failed and Elastic Beanstalk automatically rolled back the changes. This leaves the environment in an unstable state that prevents new deployments until the rollback completes or is manually resolved. CodePipeline cannot proceed because Elastic Beanstalk rejects any new update operations while in this state.

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 buildspec.yml file contains an invalid command that prevents artifact generation

    Why it's wrong here

    A buildspec.yml with an invalid command would cause the AWS CodeBuild stage to fail during the build phase, throwing an error before any deployable artifacts are produced. Since CodePipeline only proceeds to the next stage after the prior stage completes successfully, the deploy stage would never be reached——so this cannot explain a failure at the deploy stage. Even if an old artifact existed, the pipeline would still stop at the failed build action.

  • ✓

    A previous deployment failed and triggered an automatic rollback, leaving the environment in an unstable state

    Why this is correct

    Elastic Beanstalk environments monitor deployment health and can automatically roll back a failed deployment, leaving the environment in an UPDATE_ROLLBACK_IN_PROGRESS or UPDATE_ROLLBACK_FAILED state. While the environment is rolling back, it is in an unstable state and Elastic Beanstalk rejects new application version deployments, causing the CodePipeline deploy action to fail or remain stuck. This is a known operational issue where a previous failure cascades into blocking subsequent deployments until the rollback completes or is manually resolved.

  • ✗

    A CloudWatch alarm is blocking the deployment due to high error rates

    Why it's wrong here

    CloudWatch alarms are monitoring-only constructs; they do not have any native integration to block or gate CodePipeline deployments. An alarm can trigger an Auto Scaling action, send an SNS notification, or invoke a Lambda, but it has no direct mechanism to pause or abort a pipeline execution. A deployment would only be blocked by an explicit approval action, a pipeline failure, or a resource-level constraint——not by a CloudWatch alarm.

  • ✗

    Insufficient IAM permissions for CodePipeline to pull source code from CodeCommit

    Why it's wrong here

    If CodePipeline lacks IAM permissions to pull source code from CodeCommit, the failure would occur in the source stage during the Clone or Fetch action, not during the deploy stage. In a standard pipeline, source retrieval happens first, and the pipeline aborts before the build or deploy stages execute. For the deploy stage to be the problem, you would need to look at permissions for actions like UpdateEnvironment or CreateApplicationVersion against Elastic Beanstalk, not CodeCommit read access.

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

This DOP-C02 question is part of Courseiva's 1,298-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam 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 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.