SOA-C02 Deployment, Provisioning, and Automation Practice Question
A company wants to deploy a new version of a web application to an Auto Scaling group of EC2 instances behind an Application Load Balancer. The deployment should be automated and must not cause downtime. Which AWS service should be used?
⚠ Common exam trap
The trap is confusing infrastructure-as-code tools like CloudFormation with deployment tools; candidates might choose Elastic Beanstalk because it's a deployment service, but CodeDeploy is specifically designed for automated deployments to existing EC2/ASG setups.
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
✓
AWS CodeDeploy
AWS CodeDeploy is designed to automate deployments to EC2 instances, including those in an Auto Scaling group, and supports blue/green deployments to avoid downtime. It integrates with ALB to shift traffic gradually. This makes it the correct choice for automated, zero-downtime deployments.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
AWS CloudFormation
Why it's wrong here
AWS CloudFormation is an infrastructure-as-code service that provisions and manages AWS resources such as EC2 instances, Auto Scaling groups, and load balancers. It does not perform application-level deployments like shifting traffic between old and new versions; its lifecycle is focused on resource stacks, not on deploying application code to an existing ASG. While you could use custom resources or user-data scripts to trigger code updates, that is not a native or managed deployment solution.
- ✗
AWS OpsWorks
Why it's wrong here
AWS OpsWorks is primarily a configuration management service, not designed for orchestrating zero-downtime, blue/green deployments with traffic shifting via an Application Load Balancer to an Auto Scaling group. It lacks the native integration for such a deployment strategy. It is tempting as it automates application deployment and server configuration using Chef or Puppet, making it suitable for managing server fleets and their software stacks, especially for consistent environment provisioning across multiple instances.
- ✗
AWS Elastic Beanstalk
Why it's wrong here
AWS Elastic Beanstalk is a PaaS that abstracts away infrastructure, but it creates and manages its own Auto Scaling groups, not an existing one. The scenario requires deploying to an already-existing ASG with blue/green traffic shifting via an ALB, which is a CodeDeploy capability. Beanstalk environments can be swapped using a CNAME swap, but that is environment-level, not deploying a new version into a pre-existing ASG without rearchitecting the environment.
- ✓
AWS CodeDeploy
Why this is correct
AWS CodeDeploy is purpose-built for application deployment to EC2 instances, including those in an Auto Scaling group. It supports blue/green deployments with traffic shifting via an Application Load Balancer, allowing zero-downtime releases by registering new instances and shifting traffic gradually. Its integration with ASG lifecycle hooks ensures that new instances launched during scaling out automatically receive the latest application revision, making it the correct choice.
Go deeper
Related to this question
About these practice questions
This SOA-C02 question is part of Courseiva's 1,169-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Amazon Web Services exam blueprint
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.