AWS Certified Developer – Associate (DVA-C02)DeploymentEasy

A company uses AWS CodeCommit for their source code repository and AWS CodePipeline to automate their CI/CD process. They need to ensure that every code change pushed to a specific branch in CodeCommit automatically triggers a new pipeline execution. What is the most efficient way to configure this integration?

  1. AManually start the CodePipeline after every push to CodeCommit.
  2. BUse a Lambda function triggered by CodeCommit notifications to start the CodePipeline.
  3. CConfigure the CodePipeline's source stage to use an AWS CodeCommit repository with event-based change detection.
  4. DSet up a CloudWatch Event Rule to detect CodeCommit push events and trigger the CodePipeline.
Show answer & explanation

Correct answer: C. Configure the CodePipeline's source stage to use an AWS CodeCommit repository with event-based change detection.

CodePipeline's source stage has direct integration with CodeCommit. By selecting CodeCommit as the source provider and enabling 'Start the pipeline on source code change', CodePipeline will automatically detect new pushes to the configured branch and initiate a new pipeline execution, making it the most efficient and native solution.

Why the other options are wrong

  • A. Manually starting the pipeline defeats the purpose of automation and is highly inefficient.
  • B. Using a Lambda function adds unnecessary complexity and overhead when a native integration exists.
  • D. While possible, CodePipeline's native integration with CodeCommit is simpler and more direct for this use case.

CodeCommit CodePipeline Integration

AWS CodePipeline natively integrates with AWS CodeCommit, allowing automatic pipeline execution triggers upon code changes (e.g., pushes to a branch) in the CodeCommit repository.

  • CodeCommit as a direct source provider in CodePipeline.
  • Automatic pipeline starts on code changes.
  • Simplifies CI/CD automation for CodeCommit users.

Memory trick: CodeCommit is the starting gun for CodePipeline.

More Deployment questions