Sachin
Sachin

Reputation: 67

How to configure event bridge for suffix ending with random date

I have configured my event bridge rule to listen event for NXP*.out files. Here is my code.

{
  "detail-type": ["vg_1"],
  "source": ["vg_1.bbg"],
  "detail": {
    "content": {
      "payload": {
        "udf": {
          "file_name": [{
            "prefix": "NXPFIX"
          }, {
            "prefix": "NXPSTL"
          }],
          "s3_object_key": [{
            "suffix": ".out"
          }],
          "s3_bucket": ["vg_1_bucket"]
        }
      }
    }
  }
}

it was working fine for files NXPFIX31120511.out and NXPSTL31120511.out, However the other team modified the files to add date after suffix NXPSTL31120511.out.20250131

Is there any way I can accommodate this change with same rule?

Upvotes: 0

Views: 24

Answers (1)

victorg
victorg

Reputation: 41

If you use an event bus rule, you can use wildcards matching patterns (aws doc) It would look like :

{
 "wildcard": "NXP*.out.*" 
}

Upvotes: 1

Related Questions