Question 385 of 1,546
Deployment, Provisioning, and AutomationhardMultiple ChoiceObjective-mapped

Quick Answer

The answer is to use CodeDeploy with the ECS blue/green deployment type, configuring a Canary or Linear traffic shifting strategy and attaching a CloudWatch alarm for error rate as a deployment alarm. This combination meets all three requirements because CodeDeploy’s blue/green deployment shifts traffic to the new task set only after health checks from the Application Load Balancer pass, ensuring zero downtime. The Canary or Linear strategy controls the traffic shift percentage, while the CloudWatch alarm acts as a deployment alarm that automatically triggers a rollback if error rates spike within the 10-minute monitoring window. On the AWS Certified SysOps Administrator Associate SOA-C02 exam, this scenario tests your understanding of how CodeDeploy integrates with ECS for safe, automated deployments—a common trap is confusing CodeDeploy’s deployment alarms with simple CloudWatch actions or assuming a rolling update alone handles rollbacks. Memory tip: think “Blue/Green + Health Check + Alarm” as the three-legged stool for zero-downtime safety.

SOA-C02 Practice Question: CodeDeploy blue/green deployment on ECS for…

This SOA-C02 practice question tests your understanding of deployment, provisioning, and automation. This is a configuration task: choose the command set that satisfies every stated requirement. Small differences — like 'secret' vs 'password' or 'transport input ssh' vs 'all' — change whether the answer is correct. A key principle to apply: codeDeploy blue/green. 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 containerized API runs on Amazon ECS with an Application Load Balancer. The team wants to deploy new container versions with zero downtime, automatically route traffic to the new version only after health checks pass, and automatically roll back if error rates spike within 10 minutes of the shift. Which deployment strategy and configuration implements all three requirements?

Question 1hardmultiple choice
Review the full routing breakdown →

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

Use CodeDeploy with the ECS blue/green deployment type, configure a Canary or Linear traffic shifting strategy, and attach a CloudWatch alarm for error rate as a deployment alarm

Option A is correct because CodeDeploy's ECS blue/green deployment type supports canary or linear traffic shifting, which automatically routes traffic to the new version only after health checks pass. By attaching a CloudWatch alarm for error rate as a deployment alarm, CodeDeploy can automatically trigger a rollback if error rates spike within the specified monitoring period (e.g., 10 minutes), meeting all three requirements: zero downtime, health-check-gated traffic shifting, and automatic rollback on error rate spikes.

Key principle: CodeDeploy blue/green

Answer analysis

Option-by-option breakdown

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

  • Use CodeDeploy with the ECS blue/green deployment type, configure a Canary or Linear traffic shifting strategy, and attach a CloudWatch alarm for error rate as a deployment alarm

    Why this is correct

    The ECS blue/green deployment starts the green task set, registers it with a second target group, and uses ALB weighted routing to shift traffic progressively. The deployment alarm monitors a 5xx error rate metric. If the alarm enters ALARM state at any point during traffic shifting or the bake period, CodeDeploy automatically shifts traffic back to the original blue target group. The team defines the 10-minute bake window via the deployment configuration's terminationWaitTimeInMinutes.

    Related concept

    CodeDeploy blue/green

  • Update the ECS service with a rolling update deployment configuration and set the minimum healthy percent to 100

    Why it's wrong here

    Rolling updates on ECS replace tasks in-place — they do not create a parallel task set and do not support weighted ALB traffic shifting between old and new versions. Rollback requires a new deployment of the previous task definition, not an automatic revert. Rolling updates cannot satisfy the traffic-shift health check gating and automatic rollback requirements.

  • Create a second ECS service with the new task definition and use Route 53 weighted routing to shift traffic at the DNS level

    Why it's wrong here

    Route 53 weighted routing shifts traffic at the DNS level with TTL-based propagation delays (minutes). DNS clients cache the old record, making precise traffic percentages approximate. ALB-level traffic shifting in CodeDeploy ECS blue/green is more accurate and immediate. DNS-based shifting also cannot easily achieve automatic rollback based on CloudWatch alarms.

  • Enable ECS circuit breaker on the service to roll back failed deployments automatically

    Why it's wrong here

    The ECS circuit breaker rolls back a deployment if the new task set fails to start (tasks keep failing health checks and entering STOPPED state). It does not monitor application-level error rates after traffic is successfully shifted. It cannot implement a post-shift alarm-based rollback during a defined bake period.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates often confuse the ECS circuit breaker (which only handles task-level failures during deployment) with the need for post-deployment error rate monitoring and traffic shifting, leading them to select Option D without realizing it lacks the canary/linear traffic shifting and CloudWatch alarm integration required for automatic rollback based on error spikes.

Detailed technical explanation

How to think about this question

CodeDeploy's blue/green deployment for ECS uses an original (blue) and replacement (green) task set, with a load balancer target group for each. The canary strategy shifts a small percentage of traffic (e.g., 10%) to the green task set initially, and after a specified interval (e.g., 5 minutes), shifts the remaining traffic if no alarms trigger. The CloudWatch alarm monitors the error rate metric (e.g., HTTP 5xx responses) from the Application Load Balancer; if the alarm enters ALARM state within the deployment's monitoring window, CodeDeploy automatically initiates a rollback to the blue task set, ensuring minimal user impact.

KKey Concepts to Remember

  • CodeDeploy blue/green
  • ECS deployment
  • traffic shifting
  • ALB target groups
  • rollback

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

CodeDeploy blue/green

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. CodeDeploy blue/green 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.

Review codeDeploy blue/green, then practise related SOA-C02 questions on the same topic to reinforce the concept.

Related practice questions

Related SOA-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 SOA-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 SOA-C02 question test?

Deployment, Provisioning, and Automation — This question tests Deployment, Provisioning, and Automation — CodeDeploy blue/green.

What is the correct answer to this question?

The correct answer is: Use CodeDeploy with the ECS blue/green deployment type, configure a Canary or Linear traffic shifting strategy, and attach a CloudWatch alarm for error rate as a deployment alarm — Option A is correct because CodeDeploy's ECS blue/green deployment type supports canary or linear traffic shifting, which automatically routes traffic to the new version only after health checks pass. By attaching a CloudWatch alarm for error rate as a deployment alarm, CodeDeploy can automatically trigger a rollback if error rates spike within the specified monitoring period (e.g., 10 minutes), meeting all three requirements: zero downtime, health-check-gated traffic shifting, and automatic rollback on error rate spikes.

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

Review codeDeploy blue/green, then practise related SOA-C02 questions on the same topic to reinforce the concept.

What is the key concept behind this question?

CodeDeploy blue/green

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

Keep practising

More SOA-C02 practice questions

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 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.