amazon-web-services Elastic Beanstalk Blue/Green Deployments on Elastic Beanstalk


Example

Blue/Green deployment is a release technique that reduces downtime and risk by running two identical production environments (one called "Blue", the other called "Green"). At any one time, only one of the environments is serving live traffic, while the other is sitting idle.

When deploying a new version, the code is deployed to the idle environment (eg. Green) and after confirming a successful deployment, live traffic is switched (eg. Green has new code, traffic from Blue is now routed to Green). The next code deploy will occur on the new idle environment (following the example, that would now be Blue).

Example/Visual Aid:

blue/green deployment example

image source: https://cloudnative.io/statics/blog/aws-blue-green-deployment.png


When using Elastic Beanstalk (EB), you can easily create multiple environments that are exact clones of one another for code deployment. After confirming that the new environment is ready to go live, it is as simple as using the "Swap URLs" function in EB to swap environments.

Step-by-step instructions: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.CNAMESwap.html