All Products
Search
Document Center

EventBridge:Integrate Jenkins with EventBridge through an API destination

Last Updated:Mar 11, 2026

EventBridge API destinations let you call HTTP endpoints in third-party or self-managed systems directly from event rules -- without custom middleware or extra infrastructure. This helps you easily build and connect to SaaS applications and prevent data silos. Jenkins is a Java-based tool for continuous integration that you can use to build and test software projects in a continuous and automatic manner, and monitor the status of external tasks. This guide walks through connecting Jenkins to EventBridge so that published events automatically trigger Jenkins builds.

How it works

An API destination defines the metadata for an HTTP call: the URL, HTTP method, and request parameters. A connection stores the authentication credentials and network settings for that call. Together, they form a reusable integration point that any event rule can reference.

API destination architecture

When an event matches a rule, EventBridge sends an HTTP request to the API destination using the credentials from the associated connection. In this guide, EventBridge calls the Jenkins build API with basic authentication to start a project build.

Key concepts

ConceptDescription
API destinationHTTP endpoint metadata (URL, method, parameters) that event rules invoke as a target. You can reference the same API destination from multiple event rules. Updating the API destination automatically propagates the change to every rule that uses it.
ConnectionReusable authentication and network configuration shared across multiple API destinations. A network configuration specifies whether a system connects over the Internet or a private network. Modify a connection once, and all linked API destinations inherit the update.
Event ruleMatches incoming events and routes them to one or more targets

Supported authentication methods

MethodHow it works
Basic authenticationSends a Base64-encoded username:password pair in the Authorization header, prefixed with Basic
OAuth authenticationAllows you to authorize a third-party application by using an authorization code, an implicit authorization code, a password, or a client credential. In event-driven scenarios, client credentials are commonly used. Configure the client ID, client password, and IP address of the OAuth service to obtain a client credential. Supports GET and POST token retrieval
API keySends a custom key name and value in an HTTP header
This guide uses basic authentication with a Jenkins API token. The same workflow applies to OAuth or API key authentication -- only the connection configuration differs.

Prerequisites

Before you begin, make sure you have:

Step 1: Generate a Jenkins API token

  1. Log on to Jenkins and click your account name in the upper-right corner.

  2. In the left-side navigation pane, click Configure.

  3. In the API Token section, click Add new Token.

    Add new Token

  4. Enter a token name and click Generate.

  5. Click the copy icon to copy the generated token string. Save it in a secure location -- you need it in the next step.

    Copy a password

Step 2: Create a connection

A connection stores the Jenkins credentials that EventBridge uses to authenticate API requests.

  1. Log on to the EventBridge console.

  2. In the left-side navigation pane, choose Integration Center > API Destination.

  3. In the top navigation bar, select the target region.

  4. Click the Connection Configuration tab, then click Create.

  5. In the Create Connection panel, configure the following parameters and click OK.

    ParameterValue
    NameA descriptive name for the connection, such as jenkins-connection
    Description(Optional) A brief description
    AuthenticationSelect Basic. Set Username to your Jenkins account username and Password to the API token string from Step 1
    NetworkInternet (default)

Step 3: Create an API destination

The API destination points to the Jenkins build URL and references the connection you created in Step 2.

  1. Click the API Destination tab, then click Create.

  2. In the Create Connection panel, configure the following settings and click OK.

    Basic Information

    ParameterValue
    MethodSelect Custom
    NameA descriptive name, such as jenkins-build
    Description(Optional) A brief description

    API Configuration

    ParameterValue
    URLThe Jenkins build API URL, for example: http://<jenkins-host>:8080/job/test/build
    HTTP MethodSelect POST

    Connection Configuration

    ParameterValue
    Select Existing ConnectionChoose the connection created in Step 2

Step 4: Create an event rule with the API destination as the target

  1. In the left-side navigation pane, click Event Buses.

  2. In the Custom Event Buses section, click Create.

  3. In the Create Custom Event Bus panel, complete the following steps:

    1. Event Bus: Enter a Name and Description, then click Next Step.

    2. Event Source: Enter an Event Source Name and Description. Set Event Provider to Custom Application, then click Next Step.

    3. Event Rule: Enter an Event Rule Name and Description, then click Next Step.

    4. Event Target: Configure the following parameters:

    ParameterValue
    Service TypeSelect Triggered by API operation
    MethodSelect Use Existing Item
    HTTP ParameterSpecify the parameters to pass when the event triggers a Jenkins build
  4. Click Create.

Step 5: Publish a test event

  1. On the Event Buses page, find the custom event bus you created and click Publish Event in the Actions column.

  2. In the Publish Event to Custom Event Bus panel, select your custom event source from the Custom Event Source drop-down list and click OK.

Verify the integration

After publishing the event, confirm that Jenkins received it and started a build.

  1. Open the Jenkins home page and click the project specified in the API destination URL (for example, test).

  2. In the Build History section, click the most recent build entry.

    View the build history

  3. In the left-side navigation pane, click Console Output to view the build log. The log confirms that Jenkins received the event published by EventBridge and started the build.

    View log details