Menu
AWS CodePipeline
User Guide (API Version 2015-07-09)

Start a Pipeline Execution in AWS CodePipeline

When a pipeline execution starts, it runs a revision through every stage and action in the pipeline.

There are two ways to start a pipeline execution:

  • Automatically: Using change-detection methods that you specify, you can make your pipeline start automatically when a change is made to a repository. You can also make your pipeline start automatically on a schedule. The following are the automatic change-detection methods:

    • When you use the console to create a pipeline that has an AWS CodeCommit source repository or Amazon S3 source bucket, AWS CodePipeline creates an Amazon CloudWatch Events rule that starts your pipeline when the source changes. This is the recommended change-detection method. If you use the AWS CLI to create the pipeline, the change-detection method defaults to automatically starting the pipeline by checking the source periodically. It is recommended to disable periodic checks and create the additional resources manually. For more information, see Start an AWS CodeCommit Pipeline Automatically Using a CloudWatch Events Rule.

    • When you use the console to create a pipeline that has a GitHub repository, AWS CodePipeline creates a webhook that starts your pipeline when the source changes. This is the recommended change-detection method. If you use the AWS CLI to create the pipeline, the change-detection method defaults to automatically starting the pipeline by checking the source periodically. It is recommended to disable periodic checks and create the additional resources manually. For more information, see Start a GitHub Pipeline Automatically Using Webhooks.

  • Manually: You can use the console or the AWS CLI to manually start a pipeline, as described in Start a Pipeline Manually in AWS CodePipeline.

By default, pipelines are configured to start automatically using change-detection methods.

Note

Your pipeline runs only when something changes in the source repository and branch that you have defined.

Change-Detection Methods Used to Start Pipelines Automatically

When you create or update a pipeline, you specify the change-detection method to use to react to source repository changes. Your choice determines how your pipeline is started.

Source Detection Method Description Requires Additional Resources? Ways to Set Up Pipeline
Amazon S3 Amazon CloudWatch Events (recommended). This is the default for S3 pipelines created or edited in the console.
  • Your pipeline is triggered as soon as a change is made to the repository. Events in your bucket are filtered by AWS CloudTrail, then the Amazon CloudWatch Events rule triggers your pipeline to start.

  • Faster and more configurable than periodic checks.

Yes. Amazon CloudWatch Events rule and an AWS CloudTrail trail must be applied. Console, CLI, CloudFormation
Periodic checks AWS CodePipeline periodically contacts the source. No
AWS CodeCommit Amazon CloudWatch Events (recommended). This is the default for AWS CodeCommit pipelines created or edited in the console.
  • Your pipeline is triggered as soon as a change is made to the repository.

  • Faster and more configurable than periodic checks.

Yes. Amazon CloudWatch Events rule must be applied. Console, CLI, CloudFormation
Periodic checks AWS CodePipeline periodically contacts the source repository. No
GitHub Webhooks (recommended). This is the default for GitHub pipelines created or edited in the console.
  • Your pipeline is triggered as soon as a change is made to the repository.

  • Faster and more configurable than periodic checks.

Yes Console, CLI
Periodic checks AWS CodePipeline periodically contacts the source repository. No