Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Start running builds automatically (AWS CLI)

Focus mode
Start running builds automatically (AWS CLI) - AWS CodeBuild

If your source code is stored in a GitHub or a GitHub Enterprise Server repository, you can use GitHub webhooks to have AWS CodeBuild rebuild your source code whenever a code change is pushed to the repository.

Run the create-webhook command as follows:

aws codebuild create-webhook --project-name <project-name>

<project-name> is the name of the build project that contains the source code to be rebuilt.

For GitHub, information similar to the following appears in the output:

{ "webhook": { "url": "<url>" } }

<url> is the URL to the GitHub webhook.

For GitHub Enterprise Server, information similar to the following appears in the output:

Sample output information.
  1. Copy the secret key and payload URL from the output. You need them to add a webhook in GitHub Enterprise Server.

  2. In GitHub Enterprise Server, choose the repository where your CodeBuild project is stored. Choose Settings, choose Hooks & services, and then choose Add webhook.

  3. Enter the payload URL and secret key, accept the defaults for the other fields, and then choose Add webhook.

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.