DOP-C02 · Question #406
A company uses Amazon API Gateway and AWS Lambda functions to implement an API. The company uses a pipeline in AWS CodePipeline to build and deploy the API. The pipeline contains a source stage…
The correct answer is A. Create a smoke test script that returns an error code if the API code fails the test. Add an action D. Add an action in the build stage to run an Amazon CodeGuru code scan after the code is built. Adding a smoke-test action in the deployment stage that runs immediately after your new API is deployed - and fails the pipeline if any smoke test returns an error - ensures that buggy code never goes live. Running an Amazon CodeGuru Reviewer scan in your build stage catches…
Question
A company uses Amazon API Gateway and AWS Lambda functions to implement an API. The company uses a pipeline in AWS CodePipeline to build and deploy the API. The pipeline contains a source stage, build stage, and deployment stage. The company deploys the API without performing smoke tests. Soon after the deployment, the company observes multiple issues with the API. A security audit finds security vulnerabilities in the production code. The company wants to prevent these issues from happening in the future. Which combination of steps will meet this requirement? (Choose two.)
Options
- ACreate a smoke test script that returns an error code if the API code fails the test. Add an action
- BCreate a smoke test script that returns an error code if the API code fails the test. Add an action
- CAdd an action in the build stage that uses Amazon Inspector to scan the Lambda function code
- DAdd an action in the build stage to run an Amazon CodeGuru code scan after the code is built.
- EAdd an action in the deployment stage to run an Amazon CodeGuru code scan after deployment.
How the community answered
(27 responses)- A67% (18)
- B11% (3)
- C4% (1)
- E19% (5)
Explanation
Adding a smoke-test action in the deployment stage that runs immediately after your new API is deployed - and fails the pipeline if any smoke test returns an error - ensures that buggy code never goes live. Running an Amazon CodeGuru Reviewer scan in your build stage catches security vulnerabilities and code quality issues early. Failing the build on any findings prevents insecure or faulty code from ever reaching deployment.
Topics
Community Discussion
No community discussion yet for this question.