Amazon Webhooks Overview (Beta)
Amazon EventBridge is a serverless event bus that distributes events to connect application components and build highly scalable and resilient event-driven applications. It offers a simple way to consume webhook events from the BigCommerce platform at scale.
To use Amazon EventBridge, you must do the following:
- Set up an event source
- Associate your event source with an event bus
- Create rules for the event bus
- Subscribe to webhooks
Prerequisites
- To try out GraphQL queries and view responses, import our API examples into Postman or any other tool that allows testing of GraphQL queries.
- Enter the following environment variables before starting:
Set up an event source (Not available in Beta)
Setting up an event source with EventBridge allows you to send event data to Amazon services directly instead of being responsible for receiving that traffic yourself through a front-end web server. You can set up an event source using a Create AWS Event Source query.
Request
Response
Make note of the event_source_arn and event_source_name
Obtain the event_source_arn and event_source_name from the Graphql create event source mutation. You will not need them for the first iteration because there is no event source. After you create the event source, you will use these values later. You can save these fields in Postman as environment variables.
Associate an event bus (Not available in Beta)
The next step is to associate the event source with a bus. You can associate an event by following the procedure below:
Request
Response
Create a rule (Not available in Beta)
Creating a rule helps to move specified events to the event bus otherwise, all events are ignored.
Request
Response
Apply a target to the rule (Not available in Beta)
Add the specific targets to the specified rule. This step allows SQS to receive message requests and check end-to-end delivery.
Request
Response
Create an Amazon EventBridge webhook
Using GraphQL to create an Amazon EventBridge webhoook.
Request
Response
Receive the event message (Not available in Beta)
The next step is to trigger the event to receive the event message. Although there is limited JSON support with the SQS API, you can use SQS Receive Messages to view the event message.