DOP-C02 exam dumps

DOP-C02 practice question 141 of 411

AWS Certified DevOps Engineer - Professional. Professional level, Amazon Web Services. Free question with the correct answer and a full explanation.

DOP-C02 Question 141

Single answer

Your organization is using AWS CodePipeline for Continuous Integration and Continuous Deployment (CI/CD). A new requirement arises to ensure that any code changes pushed to the production environment must pass a security scan. The scan is conducted using a third-party tool that can be triggered via an API. How should you integrate this tool into your CI/CD pipeline to meet the requirement?

  1. A

    Use the AWS Lambda function integration in CodePipeline to invoke the third-party tool's API during the pipeline execution.

  2. B

    Add a custom action in CodePipeline to invoke the third-party tool's API and include it as a stage in the pipeline.

  3. C

    Replace AWS CodePipeline with AWS CodeBuild, as CodeBuild supports invoking third-party APIs.

  4. D

    Use AWS Step Functions to orchestrate the CodePipeline stages and invoke the third-party tool's API during the process.

Show answer and explanation

Correct answer: B

Explanation

The correct approach is to add a custom action in AWS CodePipeline to invoke the third-party tool's API. CodePipeline supports the integration of custom actions, enabling seamless integration of external tools into the CI/CD process without needing additional services like AWS Lambda or AWS Step Functions. This solution is efficient and aligns with CodePipeline's capabilities for managing complex CI/CD workflows.

  • A. Incorrect.

    Using an AWS Lambda function to invoke the API is possible but would require significant customization, including managing error handling, retries, and Lambda-to-API integration. CodePipeline natively supports custom actions, making it a more straightforward solution.

  • B. Correct.

    Adding a custom action in CodePipeline is the most appropriate solution. CodePipeline supports custom actions that can trigger APIs, allowing seamless integration of third-party tools into pipeline stages.

  • C. Incorrect.

    Replacing CodePipeline with CodeBuild is not necessary or recommended. CodeBuild is designed for build and test operations, not for orchestrating a CI/CD pipeline.

  • D. Incorrect.

    AWS Step Functions could orchestrate the process, but this approach would require replacing CodePipeline with a more complex workflow management system, which is unnecessary for this scenario.

Timed practice exam

Take a DOP-C02 practice test under exam conditions

75 questions in 180 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam