DOP-C02 Question 27
Single answerYour company runs a CI/CD pipeline on AWS CodePipeline. The pipeline deploys an application to an Amazon ECS service running on Fargate. After a recent update to the deployment process, you notice that rolling back to a previous version is time-consuming and error-prone because the rollback relies on manual intervention. How can you improve the rollback process to make it faster and more reliable?
- A
Implement AWS Elastic Load Balancer (ELB) health checks and enable ECS service deployment rollback.
- B
Use AWS CloudFormation to manage the ECS deployment and enable automatic rollback on failure.
- C
Configure Amazon ECS to use a blue/green deployment strategy with AWS CodeDeploy.
- D
Enable manual approval steps in AWS CodePipeline to ensure rollbacks are handled by humans.
Show answer and explanation
Correct answer: C
Explanation
To improve the rollback process for an ECS service running on Fargate, using a blue/green deployment strategy with AWS CodeDeploy is the most effective solution. This method ensures zero-downtime deployments and allows for quick and automated rollbacks by retaining the previous version until the new version is validated. Other options either do not directly address rollbacks or rely on manual intervention, which is prone to errors and delays.
- A. Incorrect.
Elastic Load Balancer health checks can assist in identifying unhealthy tasks, but they do not directly enable automated rollbacks for ECS deployments.
- B. Incorrect.
AWS CloudFormation can manage ECS deployments and supports rollback on failure, but it is not the most efficient or native approach for ECS services running on Fargate in this scenario.
- C. Correct.
Using a blue/green deployment strategy with AWS CodeDeploy is the best approach. It allows safe rollbacks by keeping the previous version active until the new one is verified, enabling seamless and automated rollbacks if needed.
- D. Incorrect.
Manual approval steps in AWS CodePipeline are useful for controlled deployments but do not improve the reliability or speed of the rollback process.