Advertisement
Intermediate AWS, AWS CodePipeline, CodeBuild & CodeDeploy (CI/CD)

What deployment strategies does AWS CodeDeploy support, such as in place and blue green deployments?

Short answer

CodeDeploy supports in place deployments, where the new application version is installed directly onto existing instances one batch at a time, briefly taking each batch out of service during the update, and blue green deployments, where an entirely new set of instances is…

Save AWS mock interview
Advertisement
AModel answer
CodeDeploy supports in place deployments, where the new application version is installed directly onto existing instances one batch at a time, briefly taking each batch out of service during the update, and blue green deployments, where an entirely new set of instances is provisioned with the new version, traffic is shifted over once the new environment is verified healthy, and the old instances are terminated afterward, offering safer rollback capability at the cost of temporarily running duplicate infrastructure.
Example

aws deploy create-deployment --application-name my-app --deployment-group-name my-deployment-group --deployment-config-name CodeDeployDefault.AllAtOnce

Real-world example
An online banking application uses blue green deployments through CodeDeploy for its critical transaction processing service, ensuring that if any issue is detected with the new version, traffic can be instantly shifted back to the still running old environment.
Likely follow-ups
  • What is the difference between AllAtOnce, HalfAtATime, and OneAtATime deployment configurations?
  • How does CodeDeploy verify that a new deployment is healthy before proceeding?
Related topics