DOP-C02 exam dumps

DOP-C02 practice question 3 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 3

Select 2

Your team is responsible for managing a CI/CD pipeline for a serverless application hosted on AWS. The pipeline includes source code in AWS CodeCommit, build configurations in AWS CodeBuild, and deployment using AWS CodeDeploy. You want to ensure that the pipeline automatically triggers a deployment when changes are pushed to the main branch in CodeCommit. Which combination of actions should you take to achieve this?

  1. A

    Set up an Amazon CloudWatch Event rule to trigger the pipeline execution when a CodeCommit event occurs.

  2. B

    Configure an AWS Lambda function to listen to CodeCommit events and manually invoke the pipeline.

  3. C

    Add an event trigger in CodePipeline to listen to changes in the main branch of the CodeCommit repository.

  4. D

    Enable the CodePipeline webhook to automatically detect changes in the CodeCommit repository.

  5. E

    Manually trigger the pipeline execution through the AWS Management Console after every commit.

Show answer and explanation

Correct answers: A, D

Explanation

To automate the CI/CD pipeline for changes in the CodeCommit repository, you can use either an Amazon CloudWatch Event rule or a CodePipeline webhook. Both options allow the pipeline to automatically trigger when a push event occurs, ensuring smooth integration and automation within the SDLC workflow. Other methods like manual triggering or using Lambda functions add unnecessary complexity or negate the purpose of pipeline automation.

  • A. Correct.

    Correct: An Amazon CloudWatch Event rule can monitor changes in the CodeCommit repository and trigger the pipeline when a specific event (e.g., a push to the main branch) occurs.

  • B. Incorrect.

    Incorrect: While an AWS Lambda function could be configured to trigger the pipeline, it is not the most efficient or AWS-recommended approach for automating CI/CD pipelines with CodePipeline.

  • C. Incorrect.

    Incorrect: There is no direct configuration in CodePipeline to listen to changes in CodeCommit. Triggers must be set up through external services like CloudWatch Events or webhooks.

  • D. Correct.

    Correct: Enabling the CodePipeline webhook integrates CodeCommit with CodePipeline, allowing it to automatically detect and respond to changes in the repository.

  • E. Incorrect.

    Incorrect: Manually triggering the pipeline through the AWS Management Console negates the purpose of automation in a CI/CD pipeline and is not a recommended approach.

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