1

I know we can have AND condition in event pattern, for example:

{
  "field1": ["option1", "option2"],
  "field2": ["option3"]
}

is there anyway, we can add a OR condition between field1 & field2? So the event rule will be satisfied on both cases:

  • { "field1": "option1" }
  • { "field1": "option2" }
  • { "field2": "option3" }
  • { "field1": "option1", field2: "option3" }

please note that setting up multiple rule is not an option, because the target is writing the data to s3, and i don't want to write multiple file when data satisfying multiple rule.

Thanks in advance.

saif
  • 370
  • 1
  • 3
  • 16

1 Answers1

2

Unfortunately, OR conditions between different keys not supported at this moment. As you mentioned, two rules are not an option. The simplest and cheapest approach is unfortunately to create a simple lambda with 10 lines of code to do the filtering for you.

All other solutions (e.g. a step function target for your event rule) is either more complex or more expensive.

LRutten
  • 1,634
  • 7
  • 17