- Newest
- Most votes
- Most comments
By default, events generated by AWS services get sent to the default event bus in Eventbridge. The custom event bus will be used for custom code (if you use the Eventbridge APIs to send events from your code). It is however possible to send an event from one bus to another - https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-bus-to-bus.html
On the last sentence, are you using the same AWS account for all your environments? This is not a recommended practice. Ideally, all environments should be in their own AWS accounts. Sometimes customers do use the same AWS account for lower environments such as Dev and Test, but then use separate accounts for Pre-prod and Prod. At the minimum, production accounts should be separate from non-production accounts. Even if you share the same AWS account between different environments, the workloads should be kept separate. That is however difficult if you are using Eventbridge default event bus because there can be only one default event bus in one AWS account. How would you know if an event on the default event bus is meant for the Dev environment or the Test environment? This needs to be thought through more.
We actually do have a separate account for production and one for lower environments. The account for lower environments includes development/qa/stage. We do currently use EDA for other use cases. The EventBridge API is used which includes the actual name of the target bus. Here is a sample setup:
const entry: EventBridge.PutEventsRequestEntry = { Source: <domainName>, DetailType: <eventName>, EventBusName: <busName>, Detail: JSON.stringify(request), };
- Reacting to Amazon Location Service events with Amazon EventBridge : https://docs.aws.amazon.com/location/latest/developerguide/location-events.html
- Tracking using MQTT with Amazon Location Service : https://docs.aws.amazon.com/location/latest/developerguide/tracking-using-mqtt.html
Relevant content
- asked 3 years ago
- Accepted Answerasked 8 months ago
- Accepted Answerasked 8 months ago
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated 25 days ago
So it sounds like all ENTER/EXIT events for AWS Location will always be routed to the "default" bus, and there is no way to programmatically put that event on a specific EventBridge bus. I was hoping to avoid a scenario like this, but sounds like we may have no other choice. Just to be clear, what you are suggesting is that all Location events for geofence ENTER/EXIT will go to the default bus, and from there we can route traffic to the proper environment EventBridge bus (dev/qa/production/etc...)?