New to RisingWave webhooks? Before configuring EventBridge, it’s recommended to run a quick local smoke test to confirm your RisingWave webhook listener is reachable and your table is ingesting events. See Webhook endpoint and Quick local smoke test.
1. Create a table in RisingWave
Next, create a table configured to accept webhook data from Amazon EventBridge.
Or you can also use raw string for verification without secret:
2. Set up webhook in Amazon EventBridge
After configuring RisingWave to accept webhook data, set up Amazon EventBridge to send events to your RisingWave instance.RisingWave webhook URL
The webhook URL should follow this format:https://<HOST>/webhook/<database>/<schema_name>/<table_name>.
Configure webhook in Amazon EventBridge
For more detailed instructions, refer to the Amazon EventBridge documentation. Before configuring RisingWave as a target in EventBridge, it’s important to understand two key concepts:- Event Bus: An EventBridge event bus is a logical collection point for events. Events from various sources flow into an event bus. You can use the default event bus or create your own custom event bus to organize and isolate your events.
- Rule: A rule in EventBridge matches incoming events and routes them to targets based on defined event patterns or schedules. When a rule matches an event, it sends the event to the configured target—in this case, your RisingWave webhook.
1
Open the Amazon EventBridge Console:
Sign in to the AWS Management Console and navigate to Amazon EventBridge.
Sign in to the AWS Management Console and navigate to Amazon EventBridge.
2
Create or Select an Event Bus:
- In the EventBridge console, go to Event buses.
- You can use the default event bus or create a new custom event bus. To create a new event bus, click Create event bus, provide a name, and click Create.
3
Create a Rule for the Event Bus:
- Navigate to Rules in the left sidebar.
- Click Create rule.
- Enter a name and description for your rule.
- Under Event bus, select the event bus you created or the default one if you wish to use it.
- Define the event pattern or schedule that determines when this rule triggers.
4
Add a Target to the Rule under Select targets:
- From the Target dropdown, select EventBridge API destination. Create a new target or use a existing target.
- For a new target, click Create a new API destination. In the API destination endpoint field, enter your RisingWave webhook URL. Set HTTP method to
POST.
5
Configure Authentication:
- Under Configure authorization, select
Custom configuration. - For Authorization type, select
API Key. Add anAuthorizationheader in API key name. The API key name should match the key specified in your RisingWave table’s validation clause (e.g.,Authorization), and the Value should be the secret you created in RisingWave (e.g.,TEST_WEBHOOK).
6
Finish Other Configurations and Save Your Configuration:
- Review your settings to ensure correctness.
- Click Create rule to finalize the configuration.
3. Push Data from Amazon EventBridge via Webhook
With the webhook configured, Amazon EventBridge will automatically send HTTP POST requests to your RisingWave webhook URL whenever there are data generated from your AWS platform. RisingWave will receive these requests, validate the signatures, and insert the payload data into the target table.4. Further event processing
The data in the table is already ready for further processing. You can access the fields usingdata->'field_name' in SQL queries.
You can create a materialized view to extract specific fields from the JSON payload.
eventbridge_events like a regular table to perform analytics, generate reports, or trigger further processing.