JulianHaresco

How to use Amazon EventBridge with Sugar

Blog Post created by JulianHaresco Employee on Aug 29, 2019

Hi, my name is Julian Haresco and I am a Software Engineering Intern at SugarCRM. I am going to be a rising senior at Purdue University majoring in Computer Science with a focus in Machine Learning and Software Engineering. This summer, I was given the opportunity to integrate Amazon’s Beta EventBridge API with Sugar for SugarCRM to become one of Amazon's ten launch partners for the EventBridge.

 

What is Amazon EventBridge?

In case you haven’t heard, Amazon released a new product for its cloud services called Amazon EventBridge. This service is a new addition to the vast array of services offered within Amazon Web Services (AWS) but comes with a very special feature that I believe makes it stand out from other products offered by Amazon’s cloud service. EventBridge is unique as it allows you to utilize a third-party SaaS system to send CloudWatch Events to AWS. The biggest benefit of this product is the freedom it offers to customers. Since the Event Buses and sources are customizable based on region, they can view the events in their desired location and then have them interact with other AWS resources easily. Furthermore, prior to EventBridge, all AWS CloudWatch Events could only be triggered by another resource within AWS. So allowing them to connect to an external SaaS system simply allows for AWS to be more usable than ever before with data external to AWS.

 

Amazon has partnered with various SaaS companies to set-up what they are calling Partner Event Sources. These are SaaS systems with EventBridge Partner Event Sources integrated into their systems already for customer use. SugarCRM Inc. is one of the ten initial AWS EventBridge launch partners including Symantec, Zendesk, and SignalFx. For Sugar, this pre-installed integration builds a timeline within AWS based on the modules and logic hooks the developer desires. Empowering customers with a real-time log about how the records and relationships within their system are changing with every event sent.

 

Here’s how I did it

To meet these needs, a new administration module that is installed via a module loadable package was created named EventBridge Logic Hooks. Within this module, Sugar will automatically connect, or create, the internal “Partner event source” based on how the customer fills out the fields when creating a new record for this module. However, the values within the fields will need to meet the requirements outlined in our support documentation for Amazon EventBridge. This module then automatically creates a Sugar logic hook that will send an event to EventBridge using the Partner Event Source to the AWS account they provided once the specified module triggers the logic hook.

 

 

On the Amazon side, the EventBridge Console will automatically display the “Partner event source” with the same name displayed on the record created with Sugar. These event sources can then be attached to an Event Bridge by following Amazon’s instructions. Now our customers can attach the event source to the Event Bus. This allows them to target resources that best suit their needs.

 

 

How do developers get involved?

Developers who want to experiment with Sugar’s integration of EventBridge can download the module loadable package from SugarExchange and follow the instructions outlined with our support documentation for Amazon EventBridge to install the module. From there, developers should be able to effectively create and set-up Partner Event Sources and connect them to an EventBus within their AWS account. 

 

NOTE: This is a beta version so there are improvements that could be made. For example: The operations to Event Bridge are synchronous which may cause additional latency in save operations for enabled modules.

 

What has been our experience?

Amazon EventBridge has been incredibly easy to use in terms of creating, editing, and setting up the Partner event source within Sugar. As a developer, the documentation is clearly laid out and extremely helpful in finding the answers to any questions about configuring EventBridge within a SaaS system like Sugar. Furthermore, the EventBridge Console makes a clear distinction between a Partner event source and one I create on my own. This set-up is incredibly  intuitive and easy to use, providing a seamless set-up process from within Sugar to the AWS EventBridge Console on the customer’s side.

 

This project was just the beginning. AWS EventBridge opens up great possibilities for integration. I'll continue using it and looking for new ways to leverage this system. I hope you will too. So, please, take a look at AWS EventBridge. Connect it with Sugar. Then, tell us about your experiences in the comments.

Outcomes