I am using AWS Event Bridge in a shared developmen...
# help
I am using AWS Event Bridge in a shared development environment across a growing team of developers. What are some strategies to use a shared event bridge bus across multiple unique developer environments? I want to prevent developer1's environment from processing an event meant for developer2's environment
Don’t you have filtering?
I think I saw it before.
Hmm, I must admit I'm pretty new to Event Bridge. What kind of filtering are you referring to?
via Rules?
I never used it, but I have this in the backlog for one use-case.
interesting, this seems like what I need
perhaps I add the stage/environment in the payload of the event and use filtering to make sure targets don't get something they shouldn't
There's a "source" field you can filter on, maybe put stage in there
Is there any reason to share the event bus? If not a compelling reason, I would recommend just creating an event bus per stage.
You are likely to want to use the filtering fields for actual data, plus there is really no reason to share a serverless construct (unless you want the stages to affect one another)
my guess would be there's some webhook coming into the EB or something that they don't want to setup per stage
EB -> EB is an option there though 😄
Good guess, decent reason, and I'd probably go the multi EB route. Sharing seems wrong somehow, you only do that to save server costs in a pinch methinks.
I've gotten away so far without sharing anything either 🤞🏽
Opensearch here. 😁
It looks like a bus per stage will work for me. I started with the default event bus shared amongst all developer environments (same AWS account). I realized that the default bus didn't let me differentiate between event sources. For example, if the OrderShipped event belongs to the development work you're doing, I don't want it effecting my environment. I am thinking of this like a multi-tenancy concern, where each developer is a "tenant". Perhaps that is the wrong perspective?
I considered making an event bus per stage/developer, but my team is growing (~80ish) and EventBridge has an account limit of 100 event buses. We don't have accounts per developer, so I think we'd reach the 100 bus limit quickly.
I ended up creating an event bus per stage (prod/staging/development/etc), with the development bus meant for use across all developer environments. If each event has the stage somewhere in the payload, I can use Rules to ensure events are processed by their intended recipient.
This feels like a decent approach, but I'm certainly open to alternatives
100 is a soft limit
The only reason I would push for non-shared for dev envs is so that it is exactly like prod (which presumably wouldnt be shared).
Correct, prod is not shared
Yeah, my preferences is definitely for a bus per stage
it's just simpler