DOP-C02 Question 7
Select 3Your company is building a CI/CD pipeline for a serverless application deployed on AWS Lambda. The pipeline needs to automate the build, test, and deployment processes. Additionally, the deployment should only proceed to the production environment if all tests in the staging environment pass. Which combination of AWS services and features will help you implement this pipeline effectively?
- A
AWS CodePipeline with manual approval steps for production deployment
- B
AWS CodeDeploy with traffic-shifting deployment configuration for Lambda
- C
AWS CodeBuild for running unit tests and integration tests
- D
Amazon S3 for storing build artifacts
- E
AWS CloudFormation for defining the pipeline and infrastructure as code
Show answer and explanation
Correct answers: A, B, C
Explanation
To implement a CI/CD pipeline for a serverless application, AWS CodePipeline is used to orchestrate the process, AWS CodeBuild is used to build and test the application, and AWS CodeDeploy is used to handle deployments with traffic-shifting capabilities for Lambda. Manual approval steps in CodePipeline ensure deployments to production are gated by successful tests. While Amazon S3 and AWS CloudFormation are useful tools, they are not critical to the pipeline implementation described in the scenario.
- A. Correct.
Correct: AWS CodePipeline supports orchestrating the CI/CD pipeline and allows you to include manual approval steps for ensuring that deployments to production only happen after successful testing.
- B. Correct.
Correct: AWS CodeDeploy supports traffic-shifting configurations for Lambda deployments, which allow you to gradually shift traffic to a new version and roll back in case of failures.
- C. Correct.
Correct: AWS CodeBuild is a fully managed build service that can be used to compile source code, run tests, and produce build artifacts.
- D. Incorrect.
Incorrect: While Amazon S3 can be used for storing build artifacts, it is not essential for implementing the CI/CD pipeline itself in this scenario.
- E. Incorrect.
Incorrect: AWS CloudFormation is useful for defining infrastructure as code, but it is not directly required for the CI/CD pipeline or the deployment process described.