Skip to content

Eventbridge event bus target input transformer

0

I'd like to use Eventbridge with a rule targeting a cross-account event bus, in order to share domain events from a service running in one account and allow them to be consumed by services operating in another - in this case each of the accounts is operated by a different team so the decoupling from simply sharing events and allowing each team to determine their own implementation/integration details is valuable.

I was surprised that I couldn't find a way to configure and input transformer to reduce to simply reduce and shape the internal events into a format suitable for sharing outside of my service when using an event bus as the target of a rule in Eventbridge, whereas it is supported when targeting other services like SNS or other APIs. Have I missed something or is this not current supported?

1 Answer
1

You're correct in your observation, and it appears you haven't missed anything. Currently, Amazon EventBridge does not support input transformers when using a cross-account event bus as the target of a rule.

Input transformers are indeed supported for many other target types, including AWS services like SNS, Lambda functions, and API destinations. These transformers allow you to customize the event data before it's sent to the target, which can be very useful for shaping and reducing the event information.

However, when it comes to cross-account event bus targets, the functionality is more limited. The cross-account event delivery feature was introduced to simplify architectures by allowing direct event delivery to targets in other accounts without needing intermediary components. While this feature is powerful for cross-account event sharing, it doesn't currently include the ability to use input transformers when the target is another event bus.

For your use case of sharing domain events between different teams' accounts while reducing and shaping the events, you might need to consider alternative approaches. One possible workaround could be to use a Lambda function as an intermediary. You could set up a rule in your source account that targets a Lambda function, use an input transformer to shape the event as desired, and then have the Lambda function forward the transformed event to the cross-account event bus.

While this approach adds an extra step, it would allow you to achieve the event shaping you're looking for before sharing the events across accounts. It's worth noting that this workaround introduces additional complexity and potential latency, so you'd need to weigh these factors against your specific requirements.

If input transformation for cross-account event bus targets is a critical feature for your use case, you might want to submit a feature request to AWS. They often take customer feedback into account when prioritizing new features and improvements to their services.
Sources
Introducing cross-account targets for Amazon EventBridge Event Buses | AWS Compute Blog
Amazon EventBridge input transformation - Amazon EventBridge

answered 2 years ago

EXPERT

reviewed 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.