Ingest Amazon EventBridge events directly into your RisingWave database for real-time processing and analytics.
Amazon EventBridge is a serverless event bus service that enables you to easily connect applications using data from various event sources. By setting RisingWave as a destination for your EventBridge rule targets, you can route real-time event data generated in your Amazon account directly into your database. This allows you to leverage RisingWave’s capabilities for real-time data processing, analytics, and integrations with downstream systems, all without needing additional intermediate brokers or components.
This guide will walk through the steps to set up RisingWave as a destination for Amazon EventBridge webhooks.
Next, create a table configured to accept webhook data from Amazon EventBridge.
Parameter or clause | Description |
---|---|
data JSONB | Defines the name of column to store the JSON payload from the webhook. Currently, only JSONB type is supported for webhook tables. |
SECRET <secret> | Use an existing secret to verify incoming webhookd requests. This is optional. You can also use a raw string to verify. |
headers->>'...' | Extracts the signature provided by Amazon EventBridge in the authorization HTTP header. The header key can be any string value and you can specify it when you create your webhook destination for RisingWave. In secure_compare() function, the whole HTTP header is interpreted as a JSONB object, and you can access the header value using the ->> operator, but only the lower-case header names in the ->> operator, otherwise the verification will fail. |
test_secret | Provides the expected signature. In the example above, we directly compare the secret value of test_secret with the signature provided in the headers to verify the requests. |
secure_compare(...) | Validates requests by matching the header signature against the computed signature, ensuring only authenticated requests are processed. The secure_compare() function compares two strings in a fixed amount of time, regardless of whether they are equal or not, ensuring that the comparison is secure and resistant to timing attacks. |
Or you can also use raw string for verification without secret:
After configuring RisingWave to accept webhook data, set up Amazon EventBridge to send events to your RisingWave instance.
The webhook URL should follow this format:
https://<HOST>/webhook/<database>/<schema_name>/<table_name>
.
Parameter | Description |
---|---|
HOST | The hostname or IP address where your RisingWave instance is accessible. This could be a domain name or an IP address. |
database | The name of the RisingWave database where your table resides |
schema_name | The schema name of your table, typically public unless specified otherwise. |
table_name | The name of the table you created to receive webhook data, e.g., wbhtable . |
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.
Open the Amazon EventBridge Console:
Sign in to the AWS Management Console and navigate to Amazon EventBridge.
Create or Select an Event Bus:
Create a Rule for the Event Bus:
Add a Target to the Rule under Select targets:
POST
.Configure Authentication:
Custom configuration
.API Key
. Add an Authorization
header 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
).Finish Other Configurations and Save Your Configuration:
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.
The data in the table is already ready for further processing. You can access the fields using data->'field_name'
in SQL queries.
You can create a materialized view to extract specific fields from the JSON payload.
You can now query eventbridge_events
like a regular table to perform analytics, generate reports, or trigger further processing.
Ingest Amazon EventBridge events directly into your RisingWave database for real-time processing and analytics.
Amazon EventBridge is a serverless event bus service that enables you to easily connect applications using data from various event sources. By setting RisingWave as a destination for your EventBridge rule targets, you can route real-time event data generated in your Amazon account directly into your database. This allows you to leverage RisingWave’s capabilities for real-time data processing, analytics, and integrations with downstream systems, all without needing additional intermediate brokers or components.
This guide will walk through the steps to set up RisingWave as a destination for Amazon EventBridge webhooks.
Next, create a table configured to accept webhook data from Amazon EventBridge.
Parameter or clause | Description |
---|---|
data JSONB | Defines the name of column to store the JSON payload from the webhook. Currently, only JSONB type is supported for webhook tables. |
SECRET <secret> | Use an existing secret to verify incoming webhookd requests. This is optional. You can also use a raw string to verify. |
headers->>'...' | Extracts the signature provided by Amazon EventBridge in the authorization HTTP header. The header key can be any string value and you can specify it when you create your webhook destination for RisingWave. In secure_compare() function, the whole HTTP header is interpreted as a JSONB object, and you can access the header value using the ->> operator, but only the lower-case header names in the ->> operator, otherwise the verification will fail. |
test_secret | Provides the expected signature. In the example above, we directly compare the secret value of test_secret with the signature provided in the headers to verify the requests. |
secure_compare(...) | Validates requests by matching the header signature against the computed signature, ensuring only authenticated requests are processed. The secure_compare() function compares two strings in a fixed amount of time, regardless of whether they are equal or not, ensuring that the comparison is secure and resistant to timing attacks. |
Or you can also use raw string for verification without secret:
After configuring RisingWave to accept webhook data, set up Amazon EventBridge to send events to your RisingWave instance.
The webhook URL should follow this format:
https://<HOST>/webhook/<database>/<schema_name>/<table_name>
.
Parameter | Description |
---|---|
HOST | The hostname or IP address where your RisingWave instance is accessible. This could be a domain name or an IP address. |
database | The name of the RisingWave database where your table resides |
schema_name | The schema name of your table, typically public unless specified otherwise. |
table_name | The name of the table you created to receive webhook data, e.g., wbhtable . |
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.
Open the Amazon EventBridge Console:
Sign in to the AWS Management Console and navigate to Amazon EventBridge.
Create or Select an Event Bus:
Create a Rule for the Event Bus:
Add a Target to the Rule under Select targets:
POST
.Configure Authentication:
Custom configuration
.API Key
. Add an Authorization
header 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
).Finish Other Configurations and Save Your Configuration:
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.
The data in the table is already ready for further processing. You can access the fields using data->'field_name'
in SQL queries.
You can create a materialized view to extract specific fields from the JSON payload.
You can now query eventbridge_events
like a regular table to perform analytics, generate reports, or trigger further processing.