AWS Certified Developer – Associate (DVA-C02)DeploymentMedium

A company is migrating a monolithic application to microservices using AWS Fargate. They need to ensure that when a new version of a microservice is deployed, traffic is gradually shifted to the new version while monitoring for errors, and automatically rolled back if issues are detected. Which deployment strategy should they use?

  1. AIn-place deployment with AWS CodeDeploy
  2. BAll-at-once deployment with AWS CloudFormation
  3. CBlue/Green deployment with AWS CodeDeploy
  4. DCanary deployment with AWS CodeDeploy
Show answer & explanation

Correct answer: D. Canary deployment with AWS CodeDeploy

Canary deployment with AWS CodeDeploy allows for gradually shifting traffic to a new version of an application while monitoring its health. If issues arise, it can automatically roll back to the previous stable version, perfectly matching the requirement.

Why the other options are wrong

  • A. In-place deployment updates instances directly, without gradual traffic shifting or easy rollback.
  • B. All-at-once deployment lacks gradual traffic shifting, monitoring, and automated rollback capabilities; CloudFormation is a provisioning tool, not a deployment strategy for this scenario.
  • C. Blue/Green shifts all traffic at once (or in a single cutover) to a new environment, not gradually.

Canary Deployment

A deployment strategy that releases a new version of an application or microservice to a small subset of users or servers first, then gradually rolls it out to the entire infrastructure while monitoring its performance and error rates. It allows for quick rollback if issues are detected.

  • Gradual rollout to a small user subset.
  • Monitors performance and errors.
  • Allows for quick rollback.
  • Minimizes impact of faulty deployments.

Memory trick: Canary sings softly, then loudly, or flies back if it's too rough.

More Deployment questions