最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How to configure event bridge for suffix ending with random date - Stack Overflow

programmeradmin1浏览0评论

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?

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?

Share Improve this question asked Jan 31 at 15:10 SachinSachin 676 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

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

{
 "wildcard": "NXP*.out.*" 
}
发布评论

评论列表(0)

  1. 暂无评论