Blue Green Deployments for Web Application on EC2 Instances | DOP-C01 Exam Answer

Blue Green Deployments

Prev Question Next Question

Question

You have a web application hosted on EC2 instances.

There are application changes which happen to the web application on a quarterly basis.

Which of the following are example of Blue Green deployments which can be applied to the application? Choose 2 answers from the options given below.

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D. E.

Answer - A and C.

The AWS Documentation mentions the following.

AWS Elastic Beanstalk is a fast and simple way to get an application up and running on AWS.6 It's perfect for developers who want to deploy code without worrying about managing the underlying infrastructure.

Elastic Beanstalk supports Auto Scaling and Elastic Load Balancing, both of which enable blue/green deployment.

Elastic Beanstalk makes it easy to run multiple versions of your application and provides capabilities to swap the environment URLs, facilitating blue/green deployment.

AWS OpsWorks is a configuration management service based on Chef that allows customers to deploy and manage application stacks on AWS.7 Customers can specify resource and application configuration, and deploy and monitor running resources.

OpsWorks simplifies cloning entire stacks when you're preparing blue/green environments.

For more information on Blue Green deployments, please refer to the below link:

https://d0.awsstatic.com/whitepapers/AWS_Blue_Green_Deployments.pdf

Blue-Green deployment is a method of releasing new versions of an application with zero-downtime. In this method, two identical environments are set up, one with the current version of the application (Blue), and the other with the new version (Green). The traffic is initially directed to the Blue environment, and once the new version is tested and verified, traffic is switched to the Green environment.

Given the scenario of having a web application hosted on EC2 instances and application changes that happen on a quarterly basis, we can explore which of the options given provide a blue-green deployment solution.

A. Deploy the application to an Elastic Beanstalk environment. Have a secondary Elastic Beanstalk environment in place with the updated application code. Use the swap URL's feature to switch onto the new environment.

Elastic Beanstalk (EB) is a platform-as-a-service (PaaS) offered by AWS to deploy and scale web applications. In this option, we create two identical EB environments with one environment running the current application version and the other running the updated application version. We can use the swap URLs feature to switch the two environments, allowing traffic to be routed to the updated version while keeping the older version available for fallback. This option provides a blue-green deployment solution.

B. Place the EC2 instances behind an ELB.

Elastic Load Balancer (ELB) is a managed load balancing service offered by AWS to distribute traffic across EC2 instances. While using an ELB does not provide a blue-green deployment solution, it can help distribute traffic across multiple EC2 instances, improving application availability and scalability.

C. Have a secondary environment with EC2 Instances and ELB in another region. Use Route53 with geo-location to route requests and switch over to the secondary environment.

In this option, we create a secondary environment in another region with EC2 instances and ELB. Using Route53 with geo-location routing, we can direct traffic to the primary environment for the current version and the secondary environment for the updated version. This option provides a disaster recovery solution but does not provide a blue-green deployment solution.

D. Deploy the application using OpsWorks stacks. Have a secondary stack for the new application deployment. Use Route53 to switch over to the new stack for the new application update.

OpsWorks is a configuration management service offered by AWS to automate the deployment and management of applications. In this option, we create two OpsWorks stacks, one for the current version and the other for the updated version. Using Route53, we can direct traffic to the updated version stack. This option provides a rolling deployment solution but not a blue-green deployment solution.

E. Deploy the application to an Elastic Beanstalk environment. Use the Rolling updates feature to perform a Blue-Green deployment.

In this option, we deploy the application to an Elastic Beanstalk environment and use the Rolling updates feature to update the environment with the new application version. While this option provides a deployment solution, it is not a blue-green deployment solution as the updated version is gradually rolled out to the environment, potentially causing downtime or issues during the update process.

Therefore, options A and C provide blue-green deployment solutions for the web application hosted on EC2 instances.