DVA-C02 Question 297
Select 2You are tasked with setting up a CI/CD pipeline for a serverless application using AWS services. The application is built using AWS Lambda and is deployed using AWS CloudFormation. The pipeline should automate the build, test, and deployment stages. Which combination of AWS services can you use to achieve this?
- A
AWS CodePipeline, AWS CodeBuild, AWS CodeDeploy
- B
AWS CodePipeline, AWS CodeBuild, AWS CloudFormation
- C
AWS Elastic Beanstalk, AWS CodeBuild, AWS CodeDeploy
- D
AWS CodePipeline, AWS CodeCommit, AWS CodeBuild
- E
AWS CodePipeline, AWS CodeDeploy, AWS CloudFormation
Show answer and explanation
Correct answers: B, D
Explanation
To set up a CI/CD workflow for a serverless application using AWS services, you can use AWS CodePipeline to orchestrate the workflow, AWS CodeBuild for build and test stages, and AWS CloudFormation to deploy the application. AWS CodeCommit can be used as the source repository for the application code. AWS CodeDeploy is not the appropriate choice for deploying Lambda functions in this scenario, as it is typically used for ECS, EC2, or on-premises deployments.
- A. Incorrect.
Incorrect. While AWS CodeDeploy is used for deployments, it is generally used for EC2 instances, on-premises servers, or ECS services, not directly for serverless applications like AWS Lambda. This option does not include AWS CloudFormation, which is essential for deploying resources in this scenario.
- B. Correct.
Correct. AWS CodePipeline can orchestrate the CI/CD workflow, AWS CodeBuild can handle the build and test stages, and AWS CloudFormation can deploy the serverless application.
- C. Incorrect.
Incorrect. AWS Elastic Beanstalk is not a suitable service for deploying serverless applications like AWS Lambda. This option also lacks AWS CloudFormation, which is crucial for the deployment of serverless applications.
- D. Correct.
Correct. AWS CodePipeline can manage the CI/CD workflow, AWS CodeCommit can serve as the source repository for your code, and AWS CodeBuild can manage the build and test stages. However, deployment will need to be handled via another service like AWS CloudFormation.
- E. Incorrect.
Incorrect. AWS CodeDeploy is not suited for deploying serverless applications like AWS Lambda in this scenario. This option also lacks a build stage service like AWS CodeBuild.