AWS Certified SysOps Administrator – AssociateDeployment, Provisioning, and AutomationEasy

A development team uses AWS CodeCommit for source control and AWS CodePipeline for their CI/CD workflow. They need to automatically trigger a new pipeline execution whenever code is pushed to a specific branch in their CodeCommit repository. How can this be achieved with minimal configuration overhead?

  1. AEnsure the CodePipeline source stage is configured to use the CodeCommit repository, as it automatically detects changes.
  2. BConfigure a cron job on an EC2 instance to periodically poll the CodeCommit repository for changes.
  3. CManually start the CodePipeline execution after each code push to the CodeCommit repository.
  4. DSet up an AWS CodeCommit trigger that sends an Amazon SNS notification, which then invokes a Lambda function to start the pipeline.
Show answer & explanation

Correct answer: A. Ensure the CodePipeline source stage is configured to use the CodeCommit repository, as it automatically detects changes.

When configuring an AWS CodePipeline source stage with AWS CodeCommit, CodePipeline automatically creates a CloudWatch Events rule to detect changes (pushes) to the specified branch in the CodeCommit repository and initiates the pipeline execution.

Why the other options are wrong

  • B. This is an inefficient and complex manual polling mechanism for a task that is natively supported by AWS services.
  • C. This is a manual process and does not meet the requirement for automatic triggering.
  • D. While technically possible, this involves unnecessary complexity with SNS and Lambda, as CodePipeline natively integrates with CodeCommit for automatic triggers.

CodePipeline CodeCommit Integration

AWS CodePipeline automatically detects changes in an AWS CodeCommit repository when configured as a source stage, triggering pipeline executions without extra manual steps.

  • Uses CloudWatch Events rules internally.
  • Supports specific branches or all branches.
  • Simplifies CI/CD setup for CodeCommit users.

Memory trick: CodePipeline *sees* CodeCommit changes and just *goes*.

More Deployment, Provisioning, and Automation questions