Courseiva

CodeDeploy Blue/Green Deployment

Which TWO options are best practices for automating deployments using AWS CodeDeploy? (Choose two.)

⚠ Common exam trap

A common mix-up: candidates confuse 'automating deployments' with 'eliminating all manual steps,' leading them to select Option E (manual approval for every deployment) as a safety measure, when in fact AWS CodeDeploy's automatic rollback and blue/green strategies provide safer automation without requiring human intervention for every change.

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 a blue/green deployment strategy

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.

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 a single deployment group for all environments

    Why it's wrong here

    Using a single deployment group for all environments is an anti-pattern because it couples the release lifecycle across dev, test, and prod, so any deployment reaches every environment simultaneously with no staging gate. In AWS CodeDeploy, deployment groups define which EC2 instances, Lambda functions, or ECS services receive a revision, and mapping them to environment-specific tags or Auto Scaling groups is required to isolate failures, control configuration, and enable per-environment promotion.

  • ✓

    Use a blue/green deployment strategy

    Why this is correct

    A blue/green deployment strategy is a best practice because it provisions the new application version in a separate 'green' environment alongside the existing 'blue' one, allowing traffic to be switched over only after the new version passes health checks. This minimizes downtime and gives an almost instantaneous rollback path by simply redirecting traffic back to blue if a problem is detected. In AWS, this works with CodeDeploy, Elastic Beanstalk, and ECS, though stateful workloads like databases require careful compatibility analysis between the two environments.

  • ✗

    Deploy to all instances simultaneously

    Why it's wrong here

    Deploying to all instances simultaneously maximizes the blast radius: a single faulty revision immediately takes the entire fleet out of service, causing a full outage and making rollback more complicated if in-place updates are irreversible. Automated best practices favor rolling or canary deployments that update a small subset first, run automated health checks, and only continue if those instances remain healthy. This incremental approach preserves availability and gives the pipeline a natural feedback checkpoint before widespread exposure.

  • ✓

    Configure automatic rollback in case of deployment failure

    Why this is correct

    Configuring automatic rollback is a best practice because it uses deployment health checks or CloudWatch alarms to detect failed deployments and automatically revert to the last known good revision, drastically reducing mean time to recovery. This is especially important for unattended CI/CD pipelines where a human cannot monitor every deployment. However, rollbacks must be designed thoughtfully—if the failure involved a destructive or one-way database migration, simply redeploying the old code may not be enough to restore service.

  • ✗

    Require manual approval for every deployment

    Why it's wrong here

    Requiring manual approval for every deployment undermines the core benefit of continuous delivery: fast, repeatable, and auditable releases. Human review introduces latency and is prone to inconsistency, yet it does not reliably catch defects that automated tests and canary analysis can identify. Manual approvals are best reserved for high-risk production promotions, not every environment or change, because over-gating blocks the automation feedback loop and slows the delivery of features and fixes.

About these practice questions

Courseiva writes every SOA-C02 question from scratch — 1,169 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

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

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.