Courseiva
SDLC AutomationmediumMultiple ChoiceObjective-mapped

DOP-C02 SDLC Automation Practice Question

A company uses AWS Elastic Beanstalk for deploying a web application. The development team wants to implement a blue/green deployment strategy to minimize downtime. Which approach should they use?

⚠ Common exam trap

Watch out — candidates often confuse the blue/green deployment mechanism in Elastic Beanstalk (CNAME swap) with the blue/green deployment in AWS CodeDeploy (which uses deployment groups and target groups), leading them to incorrectly select Option B.

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

Create a new Elastic Beanstalk environment and swap the environment CNAMEs.

In AWS Elastic Beanstalk, blue/green deployment is achieved by creating a separate environment (the green environment) alongside the existing one (the blue environment), deploying the new application version to it, and then swapping the CNAME records of the two environments. This swap is instantaneous at the DNS level, resulting in zero downtime because traffic is immediately redirected from the old environment to the new one without any instance replacement or gradual shifting.

Answer analysis

Option-by-option breakdown

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

  • Update the Auto Scaling group launch configuration and gradually replace instances.

    Why it's wrong here

    Updating the Auto Scaling group launch configuration and gradually replacing instances is a rolling update, not a blue/green deployment. Elastic Beanstalk would recycle instances in-place within the same environment, briefly exposing mixed versions and providing no separate target for validation or instant rollback. Blue/green requires a fully independent environment, so this option fails to satisfy the requirement.

  • Create a new CodeDeploy deployment group and use the blue/green deployment configuration.

    Why it's wrong here

    CodeDeploy blue/green deployment groups apply to EC2 instances, on-premises servers, or Lambda functions, and are not integrated with Elastic Beanstalk environments. Elastic Beanstalk owns the resource lifecycle and uses its own deployment mechanisms, so you cannot attach a CodeDeploy deployment group to swap an EB environment. This option is technically invalid in this context.

  • Create a new Elastic Beanstalk environment and swap the environment CNAMEs.

    Why this is correct

    Creating a new Elastic Beanstalk environment and then swapping the environment CNAMEs is the native blue/green deployment method. The new environment is fully provisioned, tested, and warmed up behind its own URL before the CNAME swap atomically redirects production traffic. This enables immediate rollback by swapping back, and it is the standard Elastic Beanstalk pattern for zero-downtime blue/green releases.

  • Create a new target group and register instances from the old environment.

    Why it's wrong here

    Creating a new target group and registering instances from the old environment is a manual Elastic Load Balancing change that bypasses Elastic Beanstalk's managed environment structure. It would mix instances from different environments and does not create an isolated, validated blue environment with its own environment URL. Elastic Beanstalk's CNAME swap is the intended and supported mechanism, making this option an incorrect workaround.

About these practice questions

This DOP-C02 question is part of Courseiva's 1,013-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.