Courseiva

DOP-C02 Resilient Cloud Solutions Practice Question

A company uses AWS CodeDeploy to deploy a new version of an application to EC2 instances. They want to minimize downtime and roll back quickly if the deployment fails. Which deployment type should they use?

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

Blue/green deployment creates two separate environments (blue and green) and shifts traffic from the old to the new after testing. This minimizes downtime because traffic is switched instantly, and rollback is achieved by reverting traffic to the original environment. Option A (Canary) is a traffic shifting pattern used within blue/green deployments, not a standalone deployment type that offers immediate rollback. Option B (Linear) is also a traffic shifting pattern for blue/green. Option D (In-place) updates existing instances, causing downtime during deployment and requiring a manual rollback 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.

  • ✗

    Canary deployment

    Why it's wrong here

    Canary is a traffic-shifting configuration that applies only within a blue/green deployment, where a small percentage of traffic is routed to the new environment before gradually increasing. It is not an independent deployment type in AWS CodeDeploy; rather, it is a strategy for transitioning between blue and green environments. While canary does allow some early detection of issues, it does not, on its own, provide the full instant-rollback mechanism that a complete blue/green deployment does, because the old environment must still be maintained and traffic must be switched back.

  • ✗

    Linear deployment

    Why it's wrong here

    Linear is another traffic-shifting pattern for blue/green deployments, shifting traffic in equal increments at fixed time intervals (e.g., 10% every 5 minutes). Like canary, it is not a separate deployment type but a configuration parameter for how traffic moves from the blue environment to the green environment. Linear deployment does not address the core rollback scenario; instant rollback is only possible because blue/green retains the original fleet, not because of the linear shifting schedule.

  • ✓

    Blue/green deployment

    Why this is correct

    Blue/green deployment in AWS CodeDeploy is the only deployment type that provisions a new, separate environment (green) alongside the existing one (blue), then shifts production traffic to the green environment. This architecture enables instant rollback by simply switching traffic back to the blue environment if the deployment fails or exhibits issues, with no need to reinstall or reconfigure instances. CodeDeploy manages this through lifecycle hooks like AllowTraffic and redirecting traffic via the load balancer, providing the fastest and most reliable rollback path.

  • ✗

    In-place deployment

    Why it's wrong here

    In-place deployment updates applications on the same set of EC2 instances, stopping the old version and installing the new one on each instance. This approach typically requires taking instances out of service, which causes downtime, and rollback is slow because you must re-deploy the previous version onto the same instances, repeating the same stop/install/validate cycle. In-place deployments do not maintain a separate environment, so they lack the ability to instantly revert to a known-good state by flipping traffic.

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 →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more way this is tested on DOP-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 DevOps team uses AWS CodePipeline to deploy a web application. The pipeline has a deploy stage that uses CodeDeploy to deploy to an Auto Scaling group. During deployment, the new instances fail health checks and the deployment rolls back. However, the rollback also fails because the old instances have been terminated. What should the team do to avoid this issue?

medium
  • A.Increase the health check grace period in the Auto Scaling group.
  • B.Add a manual approval step before the deploy stage.
  • C.Configure the pipeline to deploy to a new Auto Scaling group each time.
  • ✓ D.Use a blue/green deployment strategy in CodeDeploy to keep the old instances running until the new ones pass health checks.

Why D: A blue/green deployment strategy in CodeDeploy keeps the old (blue) instances running while the new (green) instances are provisioned and validated, so if the new instances fail health checks, the deployment can roll back to the still-running old instances. This avoids the scenario where in-place deployment terminates old instances before new ones are confirmed healthy, leaving nothing to roll back to. Blue/green also supports traffic shifting controls like all-at-once, linear, or canary.

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.