SAP-C02 · Question #755
SAP-C02 Question #755: Real Exam Question with Answer & Explanation
The correct answer is A: Use AWS CodeBuild to run unit tests and security scans. Use an Amazon EventBridge rule to. The optimal CI/CD solution involves using AWS CodeBuild for automated unit testing and security scanning within the pipeline, and Amazon EventBridge for sending alerts when unit tests fail.
Question
A company is using AWS CloudFormation as its deployment tool for all applications. It stages all application binaries and templates within Amazon S3 buckets with versioning enabled. Developers have access to an Amazon EC2 instance that hosts the integrated development environment (IDE). The developers download the application binaries from Amazon S3 to the EC2 instance, make changes, and upload the binaries to an S3 bucket after running the unit tests locally. The developers want to improve the existing deployment mechanism and implement CI/CD using AWS CodePipeline. The developers have the following requirements: - Use AWS CodeCommit for source control. - Automate unit testing and security scanning. - Alert the developers when unit tests fail. - Turn application features on and off, and customize deployment dynamically as part of CI/CD. - Have the lead developer provide approval before deploying an application. Which solution will meet these requirements?
Options
- AUse AWS CodeBuild to run unit tests and security scans. Use an Amazon EventBridge rule to
- BUse AWS Lambda to run unit tests and security scans. Use Lambda in a subsequent stage in the
- CUse Jenkins to run unit tests and security scans. Use an Amazon EventBridge rule in the pipeline
- DUse AWS CodeDeploy to run unit tests and security scans. Use an Amazon CloudWatch alarm in
Explanation
The optimal CI/CD solution involves using AWS CodeBuild for automated unit testing and security scanning within the pipeline, and Amazon EventBridge for sending alerts when unit tests fail.
Common mistakes.
- B. AWS Lambda functions are typically used for short-running, event-driven tasks and are not well-suited for running comprehensive build and test suites like CodeBuild.
- C. Jenkins is a self-managed CI server, which would introduce significant operational overhead compared to using managed AWS services.
- D. AWS CodeDeploy is used for automating application deployments, not for running unit tests or security scans within a CI/CD pipeline.
Concept tested. CI/CD pipeline with CodePipeline, CodeBuild, EventBridge
Reference. https://docs.aws.amazon.com/codepipeline/latest/userguide/how-to-create-pipeline.html
Community Discussion
No community discussion yet for this question.