All Products
Search
Document Center

EventBridge:Push events to a Lark group with EventBridge

Last Updated:Mar 11, 2026

When events occur in your applications or cloud services, you often need to notify your team immediately without building a dedicated notification system. EventBridge solves this by forwarding events from a custom event bus to a Lark group chat through a webhook URL, delivering real-time notifications directly where your team collaborates.

In this tutorial, you will:

  • Create a custom event bus and an event source

  • Set up a Lark chatbot with a webhook URL

  • Configure an event rule that routes events to the Lark chatbot

  • Publish a sample event and verify the notification in your Lark group

Event flow from EventBridge to Lark

A Lark chatbot receives messages through a webhook URL without requiring approval from the tenant administrator. Because EventBridge supports HTTP/HTTPS event targets, you can point an event rule directly at the chatbot's webhook URL to deliver formatted event data to your Lark group.

Event source → Custom event bus → Event rule (with template) → Webhook URL → Lark chatbot → Lark group

For more information about HTTP event targets, see Route events to HTTP endpoints.

Use cases

  • Real-time alerting: Get notified in Lark when infrastructure changes, deployments complete, or errors occur.

  • Lightweight notifications: Push event-driven messages to a Lark group with server-side code only, without building a separate notification service.

Prerequisites

Before you begin, ensure that you have:

Step 1: Create a custom event bus

  1. Log on to the EventBridge console.

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

  3. On the Event Buses page, select a region in the top navigation bar, then click Quickly Create in the Custom Event Buses section.

    Custom Event Buses section with the Quickly Create button

  4. In the Create Custom Event Bus wizard, complete the following steps:

    1. Event Bus: Enter a Name and Description for the event bus, then click Next Step. Event Bus step showing the Name and Description fields

    2. Event Source: Enter an Event Source Name, set Event Provider to Custom Application, then click Next Step. Event Source step showing the Event Provider field

    3. Event Rule: Click Skip, then click OK in the Skip Subsequent Steps confirmation dialog.

      Note

      You will configure the event rule in Step 3 after setting up the Lark chatbot.

  5. Verify that the custom event bus appears on the Event Buses page.

    Created custom event bus on the Event Buses page

Step 2: Create a Lark chatbot

  1. Open Lark on your PC and navigate to the group where you want to receive event notifications.

  2. In the upper-right corner of the group chat, click the settings icon (settings icon) and choose Settings.

  3. In the Settings panel, click Bots.

  4. In the Add Bot panel, click Custom Bot.

  5. Enter a name and description for the chatbot, then click Add.

  6. Copy the webhook URL that appears. Configure the Security settings based on your requirements, then click Finish.

    Important

    Store the webhook URL securely. Anyone with this URL can send messages to your Lark group. To validate that incoming requests originate from EventBridge, enable signature verification under Security settings.

Step 3: Configure an event rule

  1. Go to the Overview page of the custom event bus you created in Step 1, then click Add Rule.

    Overview page with the Add Rule button

  2. In the Create Rule wizard, complete the following steps:

    1. Configure Basic Info: Enter a name for the rule, then click Next Step. Configure Basic Info step

    2. Configure Event Pattern: Click Next Step.

      Important

      In this example, the event pattern is not configured. In a production environment, configure the Event Source and Event Type parameters to filter events based on your business requirements.

    3. Configure Targets: Set the target to deliver matched events to your Lark chatbot. Configure the following parameters:

      ParameterValue
      Service TypeHTTPS
      URLThe webhook URL you copied in Step 2
      BodyTemplate

      In the Variables editor, map event fields to template variables with JSONPath:

      {
          "msg_source": "$.source",
          "msg_type": "$.type"
      }

      In the Template editor, define the message body that Lark receives. The format must conform to the Lark bot message specification:

      {
          "msg_type": "text",
          "content": {
              "text": "Event source: ${msg_source}. Event Type: ${msg_type}"
          }
      }

      Configure Targets step with template settings

      Click Create to save the rule.

      Note

      This example uses a plain text message. For richer formatting such as interactive cards, see the Lark bot documentation. For EventBridge template syntax, see Event transformation.

Template examples

The following table shows common template patterns for Lark messages.

PatternVariablesTemplateLark output
Plain text{"src": "$.source"}{"msg_type": "text", "content": {"text": "Source: ${src}"}}Source: my.app
Multi-field{"src": "$.source", "type": "$.type", "time": "$.time"}{"msg_type": "text", "content": {"text": "Source: ${src}\nType: ${type}\nTime: ${time}"}}Source: my.app
Type: oss:ObjectCreated
Time: 2026-03-11T08:00:00Z

Step 4: Verify the result

  1. On the Overview page of your custom event bus, click Publish Event.

    Overview page with the Publish Event button

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

  3. Enter a test event in the Event Body editor, then click OK. The event body must include the fields referenced in your template variables. For the template in Step 3, include at least source and type:

    {
        "source": "my.test.application",
        "type": "test:lark:notification",
        "data": {
            "message": "Hello from EventBridge"
        }
    }

    Publish Event panel with the Event Body editor

  4. Check your Lark group for the notification message. If the message does not appear, verify the following:

    • The webhook URL in the event rule is correct.

    • The event pattern matches the test event (or no event pattern filter is configured).

    • The message template conforms to the Lark bot message format.

Clean up resources

To avoid unnecessary costs, delete resources you created solely for this tutorial:

  1. Delete the event rule: On the Overview page of your custom event bus, locate the rule and delete it.

  2. Delete the custom event bus: On the Event Buses page, find the event bus and delete it.

  3. Remove the Lark chatbot (optional): In the Lark group, go to Settings > Bots, select the chatbot, and remove it.

Related topics