DOP-C02 Question 79
Single answerYour company is building a CI/CD pipeline to deploy a web application hosted on Amazon EC2 instances. You need a solution that automates the deployment process, minimizes downtime during updates, and allows you to roll back to a previous version if needed. Which AWS service should you use to meet these requirements?
- A
AWS CodeDeploy
- B
EC2 Image Builder
- C
AWS Elastic Beanstalk
- D
Amazon ECS
Show answer and explanation
Correct answer: A
Explanation
AWS CodeDeploy is the best choice in this scenario because it is purpose-built for automating deployments to EC2 instances. It supports deployment strategies like rolling updates, blue/green deployments, and automatic rollbacks, aligning perfectly with the requirements of minimizing downtime and enabling rollback capabilities. The other options either focus on different use cases or lack the specific deployment features required for this scenario.
- A. Correct.
AWS CodeDeploy is specifically designed to automate application deployments to a variety of compute services, including Amazon EC2 instances, and supports features like zero-downtime deployments and automatic rollbacks.
- B. Incorrect.
EC2 Image Builder is primarily used for creating and automating the building, testing, and deployment of custom Amazon Machine Images (AMIs) but does not handle application deployments directly.
- C. Incorrect.
AWS Elastic Beanstalk is a platform-as-a-service offering that simplifies application deployment but does not provide granular control over deployment strategies like rolling updates or rollbacks.
- D. Incorrect.
Amazon ECS is used for running and managing containerized applications but does not handle deployments to EC2 instances in a traditional sense or provide rollback features for such scenarios.