I am using AWS Event Bridge in a shared developmen...
# help
s
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
a
Don’t you have filtering?
I think I saw it before.
s
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.
s
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
t
There's a "source" field you can filter on, maybe put stage in there
d
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)
t
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 😄
d
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.
t
I've gotten away so far without sharing anything either 🤞🏽
d
Opensearch here. 😁
s
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
d
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).
s
Correct, prod is not shared
Yeah, my preferences is definitely for a bus per stage
it's just simpler