Courseiva
Question 880 of 247
Deployment, Provisioning, and AutomationhardMultiple ChoiceObjective-mapped

CodeDeploy Blue/Green Deployment

An organization is using AWS CodeDeploy with a blue/green deployment configuration for an EC2/On-Premises compute platform. During a deployment, the new instances pass all health checks, but the old instances are not terminated after the deployment completes. What is the most likely cause?

Quick Answer

The answer is that the deployment configuration specifies 'Reroute traffic to new instances and keep old instances running' with no termination. This is the most likely cause because CodeDeploy blue/green deployments require an explicit setting to define how long old instances should remain active after traffic is rerouted; if you choose to keep them running indefinitely without a termination wait time, they will never be automatically terminated. On the AWS Certified SysOps Administrator Associate SOA-C02 exam, this question tests your understanding of CodeDeploy’s lifecycle hooks and deployment configuration options, specifically the difference between terminating old instances immediately, after a set period, or not at all. A common trap is assuming CodeDeploy always terminates old instances by default, but in reality, the user must configure the termination behavior. Remember the memory tip: “If you don’t set a timer, the old server stays a survivor.”

⚠ Common exam trap

A common mix-up: candidates assume old instances are always terminated after a successful blue/green deployment, overlooking the deployment configuration option that explicitly allows keeping old instances running with no termination.

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

The deployment configuration specifies 'Reroute traffic to new instances and keep old instances running' with no termination.

In AWS CodeDeploy blue/green deployments for the EC2/On-Premises compute platform, the deployment configuration determines the lifecycle of the original (old) instances. Option C is correct because the deployment configuration explicitly specifies 'Reroute traffic to new instances and keep old instances running' with no termination, which instructs CodeDeploy to leave the old instances running after traffic is rerouted. This behavior is controlled by the deployment group's configuration, not by Auto Scaling or health check failures.

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 Auto Scaling group has a cooldown period that prevents termination.

    Why it's wrong here

    Cooldown affects scaling, not CodeDeploy termination.

  • The new instances failed the initial health check.

    Why it's wrong here

    The question states they passed health checks.

  • The deployment configuration specifies 'Reroute traffic to new instances and keep old instances running' with no termination.

    Why this is correct

    Blue/green deployments can be configured to not terminate old instances automatically.

  • The deployment was rolled back automatically.

    Why it's wrong here

    Rollback would revert to old instances, but they would still be running.

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

1 more way this is tested on SOA-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. Which TWO options are best practices for automating deployments using AWS CodeDeploy? (Choose two.)

easy
  • A.Use a single deployment group for all environments
  • B.Use a blue/green deployment strategy
  • C.Deploy to all instances simultaneously
  • D.Configure automatic rollback in case of deployment failure
  • E.Require manual approval for every deployment

Why B: A blue/green deployment strategy minimizes downtime and risk by running two identical environments (blue for current, green for new) and shifting traffic after validation. This approach allows instant rollback by switching traffic back to the blue environment if issues arise, making it a best practice for critical production deployments.

Last reviewed: Jul 4, 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 SOA-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 SOA-C02 exam.