Skip to content

AWS CodeBuild Webhook Fails to Trigger for WORKFLOW_JOB_QUEUED Event

0

I’m trying to integrate AWS CodeBuild with GitHub Actions as a self-hosted runner environment. The setup is provisioned with Terraform and uses an AWS CodeStar Connection for GitHub auth.

Goal: Trigger CodeBuild automatically when a GitHub Actions workflow job is queued.

  • Configured aws_codebuild_webhook with a filter group for the WORKFLOW_JOB_QUEUED event.
  • GitHub correctly sends the workflow_job event → webhook delivery shows 200 OK.
  • In CodeBuild console, the event appears under Recent deliveries but with the message: “no build triggered for this configuration.”

If I switch the filter to PUSH, builds trigger fine—so the connection, permissions, and webhook basics are working.

Repro steps:

  1. Create CodeBuild project with GitHub as source.
  2. Use CodeStar connection for repo.
  3. Configure webhook filter for WORKFLOW_JOB_QUEUED.
  4. Trigger a GitHub Actions workflow → GitHub sends event, delivery succeeds.
  5. CodeBuild shows delivery but doesn’t start a build.Change filter to PUSH and push a commit → build triggers successfully.

Question: Why does CodeBuild ignore the WORKFLOW_JOB_QUEUED event even though it’s delivered successfully? Is this event supported?

asked a year ago277 views

2 Answers
0

The WORKFLOW_JOB_QUEUED event type is indeed supported by AWS CodeBuild, but there are a few specific requirements and potential issues that could be causing your webhook to fail.

First, the WORKFLOW_JOB_QUEUED event type works specifically with GitHub and GitHub Enterprise only, as indicated in the documentation. Since you're using GitHub, this shouldn't be the issue.

When using this event type, you might need to add a WORKFLOW_NAME filter to your webhook filter group. The WORKFLOW_NAME filter uses a regular expression pattern to match the workflow name, and it's specifically designed to be used with GitHub Actions workflow job queued request events.

Another potential issue could be related to permissions. If you're using GitHub Actions with deployment protection rules, CodeBuild needs to have read permissions for deployments and actions within GitHub. Verify that the credentials associated with your CodeBuild project (via the CodeStar connection) have the necessary permissions.

Additionally, check if your webhook filter group is correctly configured. Remember that a build is triggered if any filter group evaluates to true, which occurs when all the filters in the group evaluate to true. Make sure your filter configuration matches the expected pattern for the WORKFLOW_JOB_QUEUED event.

If the issue persists, you can debug by examining the webhook delivery in GitHub to see CodeBuild's response to the webhook's delivery payload. This can provide more specific information about why the build isn't being triggered.
Sources
Troubleshoot the webhook - AWS CodeBuild
WebhookFilter - AWS CodeBuild
GitHub webhook events - AWS CodeBuild

answered a year ago

0

I've tried your recommendations without success. I've added an extra filter group with the following filters:

  • "WORKFLOW_JOB_QUEUED", and
  • "WORKFLOW_NAME" with ".*" and then with a specific workflow name

It's important for you to know that "PUSH" events does trigger the CodeBuild run.

The response body that the GitHub webhook is getting from CodeBuild is: {"response":"No build triggered for specified payload","statusCode":200}

What else can I try to make this work?

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.