Question 56 of 1,616
DeploymentmediumMultiple ChoiceObjective-mapped

Quick Answer

The answer is blue/green deployment with an environment CNAME swap. This is correct because it lets you run two separate Elastic Beanstalk environments—production (blue) and staging (green)—simultaneously, then swap the CNAME records so the production URL points to the verified green environment, achieving zero downtime and a roll-forward strategy without disrupting live traffic. On the AWS Certified Developer Associate DVA-C02 exam, this scenario tests your understanding of deployment strategies that decouple infrastructure from traffic routing; a common trap is confusing this with an in-place rolling update, which modifies the existing environment and risks downtime. Remember the key distinction: blue/green uses a separate environment and a DNS-level swap, while rolling updates happen within a single environment. Memory tip: “Swap the CNAME, skip the pain—blue stays live, green takes the lane.”

DVA-C02 Deployment Practice Question

This DVA-C02 practice question tests your understanding of deployment. Match the stated requirement to the specific cloud service, access model, or configuration option — many options are valid in isolation but not for this scenario. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

A company uses AWS Elastic Beanstalk to run a web application. They want to deploy a new version with zero downtime and roll forward if successful. They have two environments: a production environment (current version) and a staging environment (new version). After verifying the staging environment, they want to swap the URLs so that production now points to the new version. Which deployment strategy should they use?

Question 1mediummultiple choice
Full question →

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

Blue/green deployment with environment CNAME swap

Option A is correct because blue/green deployment with an environment CNAME swap allows you to run two separate Elastic Beanstalk environments (production and staging) simultaneously. After verifying the new version in the staging environment, you swap the CNAME records so that the production URL points to the staging environment, achieving zero downtime and a roll-forward strategy. This approach decouples the deployment from the existing environment, ensuring no disruption to live traffic during the swap.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

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

  • Blue/green deployment with environment CNAME swap

    Why this is correct

    This strategy creates two separate environments. After testing, swapping the CNAME (e.g., via 'eb swap') redirects traffic to the new environment without downtime.

    Related concept

    Read the scenario before looking for a memorised answer.

  • All at once deployment

    Why it's wrong here

    All at once deploys to all instances simultaneously in the same environment. It causes downtime because all instances are updated at the same time and the application becomes unavailable during deployment.

  • Rolling deployment with additional batch

    Why it's wrong here

    Rolling deployment updates instances in batches within the same environment. While it minimizes downtime, it does not provide the ability to fully test the new version before traffic is routed to it.

  • Immutable deployment

    Why it's wrong here

    Immutable deployment launches a new Auto Scaling group with the new version and then swaps instances. It is similar to blue/green but within the same environment and does not use a separate environment for testing.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates confuse immutable deployments (which also launch new instances) with blue/green deployments, but immutable deployments do not create a separate environment with its own URL for a CNAME swap, making them unsuitable for the described two-environment swap requirement.

Trap categories for this question

  • Similar concept trap

    Immutable deployment launches a new Auto Scaling group with the new version and then swaps instances. It is similar to blue/green but within the same environment and does not use a separate environment for testing.

Detailed technical explanation

How to think about this question

Under the hood, Elastic Beanstalk uses Route 53 CNAME records or Alias records to map custom domains to environment URLs. During a blue/green deployment, you create a separate environment (green) with the new version, then perform a CNAME swap by updating the DNS record to point to the green environment's endpoint. This swap is near-instantaneous because it only changes DNS routing, not the underlying instances, and the old environment (blue) remains intact for immediate rollback if needed. A real-world scenario where this matters is when you must maintain compliance or audit trails by keeping the old environment available for a rollback window.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A cloud solutions architect for a retail company is evaluating services for a new workload. The correct answer here reflects best practice for the specific scenario described — not a general cloud recommendation. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Cloud exam questions reward reading the constraint carefully: the same technology can be right or wrong depending on the use case.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related DVA-C02 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free DVA-C02 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this DVA-C02 question test?

Deployment — This question tests Deployment — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Blue/green deployment with environment CNAME swap — Option A is correct because blue/green deployment with an environment CNAME swap allows you to run two separate Elastic Beanstalk environments (production and staging) simultaneously. After verifying the new version in the staging environment, you swap the CNAME records so that the production URL points to the staging environment, achieving zero downtime and a roll-forward strategy. This approach decouples the deployment from the existing environment, ensuring no disruption to live traffic during the swap.

What should I do if I get this DVA-C02 question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

4 more ways this is tested on DVA-C02

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. A company uses AWS Elastic Beanstalk to deploy a web application. The developer wants to perform a blue/green deployment to minimize downtime. The developer creates a new environment and deploys the new version. After verifying the new environment is healthy, the developer needs to swap the URLs so that traffic is routed to the new environment. Which AWS Elastic Beanstalk feature should the developer use?

medium
  • A.Use the 'Swap environment URLs' feature in the Elastic Beanstalk console.
  • B.Delete the old environment and update the DNS record to point to the new environment.
  • C.Use Amazon Route 53 weighted routing policies to shift traffic.
  • D.Change the environment's CNAME to point to the new environment.

Why A: Option C is correct because Elastic Beanstalk's 'Swap environment URLs' feature allows swapping the CNAME records between two environments. Option A is wrong because Route 53 weighted routing is not managed by Elastic Beanstalk. Option B is wrong because the environment URL cannot be changed manually. Option D is wrong because updating DNS manually is not recommended and not a built-in feature.

Variation 2. A company uses AWS Elastic Beanstalk to deploy a web application. The development team wants to deploy a new version of the application to a separate environment for testing before switching production traffic. Which deployment strategy should be used?

easy
  • A.Immutable deployment.
  • B.All at once deployment.
  • C.Blue/green deployment.
  • D.Rolling deployment.

Why C: Option D is correct because blue/green deployment creates a separate environment (green) for testing and then swaps URLs to switch traffic. Option A is wrong because all-at-once updates the current environment. Option B is wrong because rolling updates update instances in batches in the same environment. Option C is wrong because immutable updates create a new Auto Scaling group in the same environment.

Variation 3. A company uses AWS Elastic Beanstalk to deploy a web application. The development team wants to test a new feature by routing a small percentage of traffic to a separate environment before fully rolling out. Which Elastic Beanstalk deployment strategy should the developer use?

hard
  • A.Rolling deployment
  • B.Blue/green deployment
  • C.Immutable deployment
  • D.All at once deployment

Why B: Blue/green deployment is the correct strategy because it allows you to route a small percentage of traffic to a separate environment (the 'green' environment) by swapping the CNAME record or using Elastic Beanstalk's environment URL swap feature. This enables testing the new feature with a subset of users before fully rolling out to the 'blue' environment, minimizing risk and enabling quick rollback if issues arise.

Variation 4. A company uses AWS Elastic Beanstalk to run a web application. They want to deploy a new version with zero downtime. They have a production environment running the current version and a staging environment running the new version. After thoroughly testing the staging environment, they want to swap the URLs so that production now points to the new version. Which deployment strategy should they use?

easy
  • A.Blue/green deployment with CNAME swap
  • B.Rolling deployment
  • C.Immutable deployment
  • D.All at once deployment

Why A: Blue/green deployment with a CNAME swap is the correct strategy because it allows you to run two identical environments (blue = current production, green = new version) and switch traffic atomically by updating the DNS CNAME record. This achieves zero downtime since the production environment remains active until the swap is complete, and the staging environment has been fully tested. Elastic Beanstalk supports this by letting you perform a CNAME swap between environments via the console, CLI, or API.

Last reviewed: Jun 11, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This DVA-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 DVA-C02 exam.