DOP-C02 Configuration Management and IaC Practice Question
A DevOps team uses AWS Elastic Beanstalk to deploy a web application. They want to implement a blue/green deployment strategy to minimize downtime. Which configuration change should they make?
⚠ Common exam trap
A common mix-up: candidates confuse 'Immutable' deployments with blue/green, but immutable still replaces instances in-place rather than performing a CNAME swap between two independent environments.
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 environment and perform a CNAME swap.
Blue/green deployment in AWS Elastic Beanstalk is achieved by creating a separate environment (the 'green' environment) with the new application version, then swapping the CNAME of the existing 'blue' environment to point to the green environment. This CNAME swap is instantaneous and does not require DNS propagation, minimizing downtime. Option A correctly describes this process.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Create a new environment and perform a CNAME swap.
Why this is correct
In a blue/green deployment, you provision a second Elastic Beanstalk environment (the green environment) with the new application version, run tests against it, and then use the Swap Environment URLs feature to atomically redirect the existing CNAME to the new environment. This avoids any downtime during the cutover and leaves the old (blue) environment intact for instant rollback if issues arise after the swap.
- ✗
Set the deployment policy to 'All at once'.
Why it's wrong here
The 'All at once' deployment policy terminates and re-provisions every EC2 instance in the current environment simultaneously, so the application becomes unavailable for the entire deployment window. It also does not create a separate environment or alter the environment URL, meaning there is no isolated staging target and any failure requires redeploying from the same flawed configuration.
- ✗
Set the deployment policy to 'Rolling' with a batch size of 50%.
Why it's wrong here
Rolling with a batch size of 50% updates half of the existing instances at a time inside the same environment, so there is a period when two application versions serve traffic simultaneously. This is not a blue/green pattern because the environment URL is never swapped; instead the original instances are mutated in place, and if the new version is broken, you have no untouched environment to switch back to.
- ✗
Set the deployment policy to 'Immutable'.
Why it's wrong here
An immutable deployment launches a completely new Auto Scaling group with the new version while the old Auto Scaling group remains active, then shifts traffic to the new group within the same environment. Although this resembles blue/green at the instance fleet level, it does not create a second environment or perform a CNAME swap, so the original environment and its DNS name are not preserved as a separate rollback target.
Go deeper
Related to this question
About these practice questions
Courseiva writes every DOP-C02 question from scratch — 1,298 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 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.