Continuous Deployment and Rollback with AWS Services | DOP-C01 Exam Answers

Continuous Deployment and Rollback with AWS Services

Prev Question Next Question

Question

You have a development team that is planning for continuous release cycles for their application.

They want to use the AWS services available to be able to deploy a web application and also ensure they can rollback to previous versions fairly quickly.

Which of the following options can be used to achieve this requirement.

Choose 2 answers from the options given below.

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Answer - A and C.

The AWS documentation mentions the following.

In Elastic Beanstalk, an application version refers to a specific, labeled iteration of deployable code for a web application.

An application version points to an Amazon Simple Storage Service (Amazon S3) object that contains the deployable code such as a Java WAR file.

An application version is part of an application.

Applications can have many versions and each application version is unique.

In a running environment, you can deploy any application version you already uploaded to the application or you can upload and immediately deploy a new application version.

You might upload multiple application versions to test differences between one version of your web application and another.

For more information on Elastic beanstalk components , please refer to the below link:

http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/concepts.components.html

An AWS OpsWorks Stacks app represents code that you want to run on an application server.

The code itself resides in a repository such as an Amazon S3 archive; the app contains the information required to deploy the code to the appropriate application server instances.

For more information on Opswork apps , please refer to the below link:

http://docs.aws.amazon.com/opsworks/latest/userguide/workingapps.html

Option B is incorrect.

Our scenario is focusing on continuous development and continuous releases of the application versions.Since this is going to be an ongoing process, it is a best practice to upload the revision of your application and if required roll back to previous version.

Option D is incorrect.

This question gives importance to the application hosted on the infrastructure.

"They want to use the AWS services available to be able to deploy a web application and also ensure they can rollback to previous versions of the application quickly."

In this case, CloudFormation provides a common language for you to describe and provision all the infrastructure resources in your cloud environment.

CloudFormation allows you to use a simple text file to model and provision, in an automated and secure manner, all the resources needed for your applications across all regions and accounts.

Hence, CloudFormation is nothing to do with an application hosted on the infrastructure.

The two options that can be used to achieve the requirement of continuous release cycles for a web application on AWS, while ensuring the ability to rollback to previous versions are:

A. Use the Elastic Beanstalk service. Use Application versions and upload the revisions of your application. Deploy the revisions accordingly and rollback to prior versions accordingly. B. Use the Elastic Beanstalk service. Create separate environments for each application revision. Revert back to an environment in case the new environment does not work.

Here is a detailed explanation of both options:

Option A: Use Elastic Beanstalk with Application Versions

Elastic Beanstalk is a fully managed service that makes it easy to deploy and run web applications, including web servers and application frameworks such as PHP, Node.js, Python, Ruby, and Java. Elastic Beanstalk supports multiple deployment options, including rolling, blue/green, and immutable, which makes it ideal for continuous release cycles.

To deploy a web application using Elastic Beanstalk, you need to create an environment that contains the resources required by your application, such as instances, load balancers, databases, and storage. You can create a new environment for each application revision or use the same environment and update it with a new version of the application.

To ensure that you can rollback to previous versions, Elastic Beanstalk supports Application Versions. An Application Version is a snapshot of your application code and configuration that you can deploy to an environment. You can upload an Application Version to Elastic Beanstalk using the AWS Management Console, AWS CLI, or API. When you deploy a new Application Version, Elastic Beanstalk creates a new set of instances with the updated code and configuration and deploys the traffic to them gradually, allowing you to monitor the health of the new instances before cutting over all traffic to them.

To rollback to a previous version, you simply select the Application Version you want to deploy and Elastic Beanstalk will deploy it to your environment, replacing the current version. This rollback process is fast and reliable, as it uses the same deployment mechanism as the regular deployment process.

Option B: Use Elastic Beanstalk with separate environments

Another way to achieve continuous release cycles with rollback capability using Elastic Beanstalk is to create a separate environment for each application revision. This approach is useful when you want to test the new version in isolation before deploying it to production or when you have different versions of the application running in parallel.

To create a new environment, you can use the AWS Management Console or AWS CLI and select the same application and environment type as the current environment, but with a different name and version label. Elastic Beanstalk will create a new set of resources for the new environment, including instances, load balancers, and databases, and deploy the application code and configuration to them.

To test the new environment, you can use the Elastic Beanstalk URL or a custom domain name that points to the new environment. Once you are satisfied with the new version, you can swap the environment URLs using the Elastic Beanstalk console or API. This will redirect all traffic to the new environment while preserving the old environment and its resources.

If something goes wrong with the new environment, you can revert back to the old environment by swapping the URLs again. This rollback process is fast and reliable, as it only involves changing the DNS record and not redeploying the application.

Conclusion:

Both options A and B using Elastic Beanstalk provide a reliable way to achieve continuous release cycles with rollback capability for a web application on AWS. Option A is suitable for applications that require frequent updates but do not need to be tested in isolation, while option B is suitable for applications that require separate testing and deployment environments.