This lab walks you through the steps to setup Blue/Green deployments with AWS Elastic Beanstalk
You will practice it using AWS Elastic Beanstalk
Duration: 1 hour
AWS Region: US East (N. Virginia) us-east-1
AWS Elastic Beanstalk is a Platform as a Service(PaaS) offered by Amazon for deploying and scaling web applications
It allows us to use a wide selection of application platforms.
It also enables us to have a variety of application deployment options.
It enables the developer to concentrate on developing rather than spending time on managing and configuring servers.
It gives us the ability to automatically scale an application up and down based on the application’s specific needs.
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.
This downtime can be avoided by performing a blue/green deployment.
Blue/Green deployments are used to update an application from one version to another version without any downtime.
The blue environment is your existing production environment carrying live traffic.
The Green environment is an identical parallel new environment running a different or updated version of the application.
Deploying of Blue/Green environments such that you can deploy a new version to a separate environment.
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).
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.
Create an Elastic BeanStalk application.
Create a Blue environment with a PHP application.
Access the Blue environment’s URL and verify whether you get the PHP application page.
Create a Green environment with a Node.js application.
Access the Green environment’s URL and verify whether you get the Node.js application page.
From the Green environment, initiated a swap of the environment URLs
Verify whether the green environment’s URL is swapped with blue environment’s URL.