DOP-C02 Question 165
Select 2Your team has deployed a microservices-based application on AWS using Amazon ECS with the Fargate launch type. You need to implement a CI/CD pipeline to automate the deployment of new application versions. The deployment should ensure zero downtime and must support automated rollback if issues are detected during deployment. Which combination of services and configurations should you use to meet these requirements?
- A
Use AWS CodePipeline with AWS CodeDeploy configured to perform a blue/green deployment strategy.
- B
Use AWS CodePipeline with AWS Elastic Beanstalk and configure the deployment policy as rolling with additional batch.
- C
Use AWS CodePipeline with Amazon ECS and AWS CodeDeploy configured for canary deployment.
- D
Use AWS CodePipeline with Amazon ECS and a custom script to deregister and register tasks manually in the target group.
- E
Use AWS CodePipeline with AWS Lambda to monitor and automatically rollback deployments on failure.
Show answer and explanation
Correct answers: A, C
Explanation
To ensure zero downtime and automated rollback for ECS deployments, AWS CodePipeline integrates seamlessly with AWS CodeDeploy using deployment strategies like blue/green or canary. These strategies allow safe updates with minimal disruption. Options involving Elastic Beanstalk or manual scripts do not meet the requirements, and while Lambda can enhance monitoring, it cannot independently manage deployment strategies.
- A. Correct.
This is a correct option. AWS CodeDeploy can be integrated with Amazon ECS to perform blue/green deployments, which ensures zero downtime and supports automated rollback in case of deployment failures.
- B. Incorrect.
This option is incorrect because AWS Elastic Beanstalk does not natively support ECS deployments, and the rolling with additional batch policy does not guarantee zero downtime.
- C. Correct.
This is a correct option. AWS CodeDeploy can be configured to perform canary deployments with ECS, providing safe incremental updates and rollback capabilities if issues are encountered.
- D. Incorrect.
This option is incorrect because using a custom script for deregistering and registering tasks manually does not ensure automated rollback or zero downtime, and it is not a recommended best practice.
- E. Incorrect.
This option is incorrect because AWS Lambda alone does not handle deployment strategies such as blue/green or canary. While Lambda can monitor deployments, it is not sufficient to meet the requirements for zero downtime or automated rollback.