DVA-C02 Question 288
Single answerYou are developing a CI/CD pipeline using AWS CodePipeline for deploying an application to a production environment. Before the deployment stage, you want to ensure that a manager manually reviews and approves the changes before proceeding. How can you achieve this in AWS CodePipeline?
- A
Add a Manual Approval action to the deployment stage of the pipeline.
- B
Use an AWS Lambda function to pause the pipeline and wait for manual approval.
- C
Add a Manual Approval action to a separate stage before the deployment stage.
- D
Integrate Amazon SNS to notify the manager and use a Lambda function to approve the pipeline.
Show answer and explanation
Correct answer: C
Explanation
The Manual Approval action in AWS CodePipeline is designed for scenarios where human intervention is required before proceeding to the next stage. Best practices suggest placing the Manual Approval action in a dedicated stage before the deployment stage to ensure clear separation of responsibilities and proper handling of approvals. Lambda functions and Amazon SNS can assist with notifications and automation but are not suitable for manual approval tasks.
- A. Incorrect.
This is incorrect because the Manual Approval action should not be added directly to the deployment stage. It should be part of its own dedicated stage in the pipeline for clarity and separation of concerns.
- B. Incorrect.
This is incorrect because AWS Lambda cannot directly handle manual approvals in CodePipeline. Lambda functions are used for automating actions, not for manual interventions.
- C. Correct.
This is correct because AWS CodePipeline allows you to add a Manual Approval action as a separate stage before the deployment stage. This ensures that no deployment occurs without explicit approval.
- D. Incorrect.
This is incorrect because while Amazon SNS can be used to notify the manager, it cannot handle manual approvals. AWS CodePipeline provides a built-in Manual Approval action for this purpose.