0

I'm trying to set up an event pattern in AWS EventBridge to filter events based on the tableName field. I want to exclude events where tableName starts with either database_1 or database_2. This condition worked well.

Now, I'm trying to add a new condition to exclude events where tableName ends with _test. However, I'm struggling to combine these two conditions in the event pattern. Does anyone know how to do this for the same field within detail?

Here's what I've tried so far:

   {
      "detail": {
        "typeOfChange": ["CreateTable", "UpdateTable"]
        "tableName": [{
          "anything-but": {
            "prefix": ["database_1", "database_2"]
          }, 
          { 
            "suffix": "_test" 
          }
        }]
      },
      "source": ["aws.glue"]
    }

Any help would be appreciated.

1 Answer 1

0

Would an $or pattern work here? https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-event-patterns-content-based-filtering.html#eb-filtering-complex-example-or

Not the answer you're looking for? Browse other questions tagged or ask your own question.