DOP-C02 Question 10
Select 4You are managing a CI/CD pipeline for a critical application that processes financial transactions. The pipeline is configured to deploy to Amazon ECS using AWS CodePipeline and AWS CodeBuild. Recently, a deployment introduced a bug that caused application downtime in production. You need to ensure future deployments are more robust and prevent faulty code from reaching production. Which of the following actions should you take to improve the pipeline's reliability?
- A
Implement automated unit tests and run them during the build stage in AWS CodeBuild.
- B
Add a manual approval action to the pipeline before deploying to production.
- C
Enable AWS CodeDeploy with Canary deployment strategy for ECS services.
- D
Use CloudWatch Alarms to automatically roll back deployments if health checks fail.
- E
Switch to deploying directly to production without a staging environment to speed up releases.
Show answer and explanation
Correct answers: A, B, C, D
Explanation
To improve the reliability of deployments, a combination of automated testing, manual oversight, and gradual deployment strategies should be implemented. Automated unit tests catch issues early, while manual approval actions provide an additional layer of validation. Canary deployments reduce the impact of issues by rolling out changes incrementally, and CloudWatch Alarms ensure that any degradation in application health is immediately addressed. These practices together ensure robust, reliable deployments.
- A. Correct.
Implementing automated unit tests ensures that basic functionality is validated before deployment, reducing the risk of introducing bugs.
- B. Correct.
Adding a manual approval action allows human oversight, which can catch issues that automated tests might miss.
- C. Correct.
Using AWS CodeDeploy with a Canary deployment strategy ensures that the new version is rolled out incrementally, reducing the blast radius of potential issues.
- D. Correct.
CloudWatch Alarms can monitor health checks and automatically trigger rollbacks if a deployment degrades application performance, improving overall reliability.
- E. Incorrect.
Deploying directly to production without a staging environment is risky and contradicts best practices for ensuring application stability.