Create EventBridge destination via API

Hi,

My company is looking at adopting EventBridge in place of webhooks, but one immediate problem that stands out is that the setup process (i.e. creating a new event destination) is entirely manual.

This involves not only manually setting up the event source, but also manually selecting which specific events get sent to that source. This presents high risk of creating mismatched configuration between sandboxes and prod environments, and all the maintenance headaches that come with that.

Are there any plans of exposing APIs for developers to create event destinations programmatically?

In a perfect world there’d be a terraform provider to create these, but writing my own provisioning scripts would be fine too.

Hi Mike!

Thanks for actively leaving feedback here – its so good to capture and make sure we are building the right things. With that said, we currently do not offer an API for managing Event Destinations.

We do, however, plan to release the managing API when the Event Destination goes GA! At that time, we plan to bring Cloud Formations template support as well. The team could also definitely consider Terraform support in the future as well.

Could you help provide more information on your use case setting up event destinations repeatably? In other words, are you setting up the same configuration (ie. which events to subscribe to) across different sandboxes or within the same account? The team has also been considering adding a UI feature in Workbench that let’s you “clone” an EventBridge in Workbench. Would you find something like this helpful in the meantime compared to a programatic API/Terraform support? Hearing your thoughts on this would be helpful input for prioritizing our roadmap.

Hi treyn,

Big use case I’m worried about here is that our application runs in multiple environments (this includes multiple pre-prod staging envs as well as multiple region-specific production envs). These all tie to the same stripe platform account and need to receive the same set of events, but at different destinations. Currently we have one webhook set up per environment.

One of the more common changes we make is to add handling for a new type of event. This requires us to update each webhook / event destination to now listen to that new event. Doing this as a manual process makes releases more tedious and leads to potential human errors (making the change to all but one environment, for example).

EventBridge does have some options to work around that. We could manually configure stripe to send events to a specific SNS topic, then our automation could fan that out into different SQS queues for each instance of the app to ingest, etc. But if we pick up heavier usage of sandboxes, that might not be feasible. For example, we’d like to eventually tie each of our pre-prod environments to a separate sandbox instead of using one big one. So, in that case we’re back to the problem of having to make the same config changes in each sandbox.

Ah that all makes sense especially for testing! You’re also correct that the the SQS fan out would not work as you adopt Sandboxes since each sandbox will send events to separate EventBridge event bus and have separate partner event sources. We are definitely working hard to get the API & Infra-as-code solution out, so hopefully that should alleviate these pains once released

Thanks for the thorough walk through of your testing flows