Blue/Green Deployments with Elastic Beanstalk

Lab Details

  1. This lab walks you through the steps to setup Blue/Green deployments with AWS Elastic Beanstalk

  2. You will practice it using AWS Elastic Beanstalk

  3. Duration: 1 hour

  4. AWS Region: US East (N. Virginia) us-east-1


AWS Elastic Beanstalk

  1. AWS Elastic Beanstalk is a Platform as a Service(PaaS) offered by Amazon for deploying and scaling web applications

  2. It allows us to use a wide selection of application platforms.

  3. It also enables us to have a variety of application deployment options. 

  4. It enables the developer to concentrate on developing rather than spending time on managing and configuring servers.

  5. It gives us the ability to automatically scale an application up and down based on the application’s specific needs. 

Blue/Green deployments with Elastic Beanstalk

  1. AWS Elastic Beanstalk performs normal deployments in the current production environment. Due to this, the application will be unavailable to users until the update is complete.

  2. This downtime can be avoided by performing a blue/green deployment.

  3. Blue/Green deployments are used to update an application from one version to another version without any downtime.

  4. The blue environment is your existing production environment carrying live traffic.

  5. The Green environment is an identical parallel new environment running a different or updated version of the application.

  6. Deploying of Blue/Green environments such that you can deploy a new version to a separate environment.

  7. Once the deployment is done, we simply route the traffic from the Blue environment to Green environment by swapping their CNAMEs or using Route 53 to slowly shift percentages of traffic over (not included in this lab)

  8. After the routing is complete, if you face any issues in the green environment, Elastic BeanStalk gives us an option to easily roll back to the blue environment.


  • Zero downtime while updating the environments and swapping.

  • It’s Easy to roll back to the older version if you face any issues in the new environment.


  1. Create an Elastic BeanStalk application.

  2. Create a Blue environment with a PHP application.

  3. Access the Blue environment’s URL and verify whether you get the PHP application page.

  4. Create a Green environment with a Node.js application. 

  5. Access the Green environment’s URL and verify whether you get the Node.js application page.

  6. From the Green environment, initiated a swap of the environment URLs

  7. Verify whether the green environment’s URL is swapped with blue environment’s URL. 

  8. Access the new URL of the green environment and verify whether you are getting the Node.js application page.

Architecture Diagram

Join Whizlabs_Hands-On to Read the Rest of this Lab..and More!

Step 1 : Login to My-Account
Step 2 : Click on "Access Now" to view the course you have purchased
Step 3 : You will be taken to our Learn Management Solution (LMS) to access your Labs,Quiz and Video courses