All Products
Search
Document Center

EventBridge:Create an HTTP/HTTPS event source

Last Updated:Mar 11, 2026

External systems such as monitoring tools, CI/CD pipelines, and custom applications often need to push events into your event-driven architecture. An HTTP/HTTPS event source provides a webhook URL that these systems can call. EventBridge determines whether to convert each incoming HTTP request into a CloudEvents v1.0-compliant event and push the event to the configured event target.

How it works

  1. You create an HTTP/HTTPS event source on a custom event bus. EventBridge generates a webhook URL.

  2. You configure the external system to send HTTP requests to this URL.

  3. EventBridge determines whether to convert the request into a CloudEvents envelope and deliver it to the event target.

Prerequisites

Before you begin, make sure that you have:

Create the event source

  1. Log on to the EventBridge console.

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

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

  4. Click the name of the target event bus.

  5. In the left-side navigation pane, click Event Sources.

  6. On the Event Source page, click Add Event Source.

  7. In the Add Custom Event Source panel, set Name and Description, and then set Event Provider to HTTP/HTTPS Events.

  8. Configure the following parameters, and then click OK.

    Parameter

    Description

    Request Type

    Protocol for the webhook URL. Select HTTPS, HTTP, or HTTP&HTTPS.

    Request Method

    HTTP methods the webhook URL accepts. Select one or more: GET, POST, PUT, DELETE, HEAD, PATCH.

    Security Settings

    Access control for incoming requests:

    • Optional -- Accept all requests without security checks.

    • CIDR Block -- Accept requests only from specified IP addresses or CIDR blocks.

    • Security Domain Name -- Accept requests only from a specified domain name.

    CIDR Block

    Required when Security Settings is CIDR Block. Specify up to five IP addresses or CIDR blocks.

    Security Domain Name

    Required when Security Settings is Security Domain Name. Specify up to five domain names.

After the event source is created, EventBridge generates a webhook URL. Copy this URL and configure it in the external system that sends events.

Event format

EventBridge converts HTTP requests that meet the specified requirements into a CloudEvents v1.0 envelope. Request headers map to data.headers and the request body maps to data.body.

{
  "datacontenttype": "application/json",
  "aliyunaccountid": "175299981560****",
  "data": {
    "headers": {
      "Host": "175299981560****.eventbridge.cn-hangzhou.aliyuncs.com",
      "Accept-Encoding": "gzip, deflate, br",
      "accept": "*/*",
      "Content-Length": "538",
      "Content-Type": "application/json"
    },
    "path": "/webhook/putEvents",
    "body": {
      "infoId": 1,
      "ruleName": "Test",
      "state": "alerting",
      "message": "EventBridge test info.",
      "ruleId": "796014154722826****"
    },
    "httpMethod": "GET",
    "queryString": {}
  },
  "subject": "acs:eventbridge:cn-hangzhou:175299981560****:eventbus/EventBridgeDemoBus/eventsource/my.httpSource",
  "aliyunoriginalaccountid": "175299981560****",
  "source": "my.httpSource",
  "type": "eventbridge:Events:HTTPEvent",
  "aliyunpublishtime": "2022-03-03T03:33:14.097Z",
  "specversion": "1.0",
  "aliyuneventbusname": "EventBridgeDemoBus",
  "id": "ac0d574c-d862-4662-a87b-784e3d77****",
  "time": "2022-03-03T11:33:14.093+08:00",
  "aliyunregionid": "cn-hangzhou",
  "aliyunpublishaddr": "42.120.XX.XX"
}

CloudEvents envelope fields

The top-level fields follow the CloudEvents v1.0 specification:

FieldTypeDescription
specversionStringCloudEvents specification version. Always 1.0.
typeStringEvent type. For HTTP/HTTPS event sources, the value is eventbridge:Events:HTTPEvent.
sourceStringEvent source name that you specified when creating the event source.
subjectStringResource identifier of the event source.
idStringUnique event identifier generated by EventBridge.
timeStringTimestamp of the event.
datacontenttypeStringContent type of the data field.
aliyunaccountidStringAlibaba Cloud account ID (partially masked).
aliyunoriginalaccountidStringOriginal Alibaba Cloud account ID (partially masked).
aliyunregionidStringRegion where the event bus resides.
aliyuneventbusnameStringName of the event bus.
aliyunpublishtimeStringTimestamp when the event was published.
aliyunpublishaddrStringIP address from which the event was published (partially masked).

Data field reference

The data field contains the parsed HTTP request:

FieldTypeExampleDescription
headersMap{"Host":"175299981560****.eventbridge.cn-hangzhou.aliyuncs.com", ...}HTTP request headers.
pathString/webhook/putEventsRequest path.
bodyString or Map{"infoId":1, "ruleName":"Test", ...}Request body. Parsed as JSON when Content-Type is application/json; otherwise returned as a plain string.
httpMethodStringGETHTTP method used in the request.
queryStringMapN/AQuery parameters from the request URL. The token parameter is excluded.