I'd like to deploy an AWS Event Rule in Eventbridge which is triggered by all events, with no filtering whatsoever.
I've tried the following patterns with no luck.
{
source: ["*"]
}
According to the documentation you cannot leave the pattern empty. Also, any fields not included in the pattern are wildcarded meaning they can be any value.
I've read articles saying Eventbridge can replace services such as SNS and SQS but without these finer controls I don't see that happening.
Thanks
EventBridge is the evolution of the CloudWatch Events service. It brings new features, including the ability to integrate data from popular SaaS providers as events within AWS.
A pattern either matches an event or it doesn't. Event patterns are represented as JSON objects with a structure that is similar to that of events, for example: { "source": [ "aws.ec2" ], "detail-type": [ "EC2 Instance State-change Notification" ], "detail": { "state": [ "running" ] } }
Use Eventbridge when:You want to publish messages to many subscribers, and use the event data itself to match targets interested certain patterns. Want integration with other SaaS providers such as Shopify, Datadog, Pagerduty, or others.
Events are generated by AWS services in a predefined JSON format and sent to Amazon EventBridge. You can create rules that use event patterns to filter incoming events and then trigger a target. There are three methods for determining the JSON format for an incoming event: 1. Refer to this list of event examples. 2.
3. Create an EventBridge rule with a simple event pattern that matches all events for a specific service. For Define pattern, choose Event Pattern. Note: Wildcards aren't permitted in the event pattern. Empty event patterns are also not allowed.
Amazon EventBridge is a serverless event bus that makes it easier to connect applications with data from a variety of sources. These event sources can be custom applications, AWS services and partner SaaS applications.
AWS EventBridge routes them to the Email service, which reads the event and sends out an email. Both services are based on Java. But the Order service runs in a container while the Email service is a Lambda function. The Order service uses AWS Java SDK to publish a custom EventBridge event that has the following format.
Based on the comments.
The solution was to use empty prefix to match all events:
{
"source": [{"prefix": "" }]
}
You can try to use exists
filter: https://docs.aws.amazon.com/eventbridge/latest/userguide/content-filtering-with-event-patterns.html#filtering-exists-matching
One caveat of using this is that it's not working properly when defined in CloudFormation, but at least it works in SDK and in console.
My favorite was { "version": ["0"] }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With