AWS Event Bridge and Problems I have faced
Problem domain:
Asynchronous Communication in Microservice World
What does it offer?
Event ingestion from many sources(AWS services or Third party)
Event delivery (Targets can be AWS service or Third party)
Event security
Event access Authorization
Event consumption Error handling
Benefits:
Connect data from SaaS apps
EventBridge ingests data from supported SaaS applications and routes it to AWS service targets through native integration in the AWS management console.
Write less code
EventBridge makes it easy to connect applications together because you can ingest, filter and deliver events without writing custom code.
Easily build event-driven architectures
With EventBridge, your event targets don’t need to be aware of event sources because you can filter and publish directly to EventBridge.
Reduce operational overhead
EventBridge is a fully managed service that takes care of all of the underlying infrastructure management tasks required to set up and run a highly scalable event bus.
why you should use EventBridge instead of SNS?
More targets, lots more targets.
SNS supports a handful of different targets, including SQS and Lambda. EventBridge on the other hand, supports a total of 20 target types.The list includes the likes of SNS, SQS, Kinesis, ECS, Lambda as well as EventBridge on another AWS account.
AWS events & Third-party events
You can also capture events from third-party partners such as PagerDuty and Datadog. This allows you to capture and react to events happening in a third-party system — user logged in to Auth0, alert is triggered in PagerDuty, etc.
Content-based filtering
SNS allows you to filter messages via filter policies. However, this support is limited as you can’t filter messages by their content.
Schema discovery
A common challenge with event-driven architecture is identifying and versioning event schemas. EventBridge deals with this challenge with its Schema Registry. It provides the schema for all AWS events out-of-the-box.
Input transformation
Another powerful feature of EventBridge is that it allows you to transform the event before passing it as input to the target(s).
Problems faced:
- Rule was not getting triggered with boolean filter attribute. If we update the same rule json manually in Event Bridge UI, it start triggering. Felt very weird. Since we were in hurry, we used string attribute in filter.
- We changed a rule to have a different PartitionKeyPath value. After deployment, it never triggered the rule.
- Tried to debug the failed invocations, but AWS does not provide any log in cloudwatch or any cloudtrail event to figure out the root cause.