Skip to main content

Integrate with Amazon EventBridge

SaaSus Platform is integrated with Amazon EventBridge. Various events that occur on the SaaSus Platform can be sent to Amazon EventBridge in the SaaS-side AWS account as a partner event source. By leveraging this, SaaS can be built with an event-driven architecture that works in conjunction with SaaSus Platform.

For example, it can be used to trigger a tenant onboarding process when a SaaS tenant is created, or to trigger the deletion of accompanying data when a user is deleted. Currently, you can retrieve events for all SaaSus APIs. Please check API Reference for the contents of each API.

How to integrate with Amazon EventBridge

Open the Event Integration Page of the SaaS Development Console.


In the AWS Account ID section, enter the AWS account ID (the 12-digit ID of the AWS account on which the SaaS is built) to which the event is sent. Also, select the AWS region where you would like to receive notifications. Then press the Save button.


A partner event path will be created on the AWS account configured above. After logging into the relevant AWS account, open the Amazon EventBridge Partner Event Source Console and verify that the Partner Event Source has been created.


Select the created partner event source and "Associate with event bus". It will then be available for use on the Event Bus just like any other event source.


Next, let's try sending an event. Open the Amazon EventBridge Bus Rules page. On this screen, you should be able to select the partner event source from earlier as an event bus.


Create rules based on this event bus. Let's set it up as shown in the following page.
First, select the SaaSus Platform event bus and click Create rule. On each page, try to enter the information referring to the following page.




In the event pattern section, first describe the following pattern to get all SaaSus Platform events. Click on the "Edit pattern" button and enter the following JSON directly.



"source": [{
"prefix": "aws.partner/"

In this case, all events are retrieved, but you can filter events to retrieve only those for specific API calls.

In this case, let's output all events to CloudWatch Logs to see what kind of events are delivered.



After all settings are complete, click Create rule and confirm that the rule has been created.



Now that we are ready to link events. Send a test event by returning to the SaaSus development console and clicking the Send Test button.


If the event arrives successfully, the event should be recorded in CloudWatch Logs. Let's check.


We are now able to retrieve events in this manner.

In this case, we linked to CloudWatch Logs, but it is possible to link events to various targets such as Lambda and other APIs. This allows us to apply an event-driven architecture, separating where the SaaSus API was called from and when it was called, and what should be done as a result and when.

The "detail" entry contains a "trace_id". This is the same as the one specified at the time of the SaaSus API request or the one generated automatically, so you can trace which API call caused the event.