简体   繁体   English

AWS EventBridge - 自定义 s3 事件模式

[英]AWS EventBridge - Customize s3 event pattern

I have a s3 bucket with EventBridge events enabled and I have the following bucket structure.我有一个启用了 EventBridge 事件的 s3 存储桶,并且我有以下存储桶结构。

s3://bucket/db/table/LOAD00001.csv

I need to create an event pattern that will identify all new files that contains "LOAD" in the filename.我需要创建一个事件模式来识别文件名中包含“LOAD”的所有新文件。

My event pattern looks like:我的事件模式如下所示:

  {
      "source": ["aws.s3"],
      "detail-type": ["Object Created"],
      "detail": {
        "bucket": {
          "name": [{
            "suffix": "-landing"
          }]
        },
        "object": {
          "key": ["*LOAD*"]
        }
      }
    }

I have tried some combinations using prefix and sufix but no success yet.我尝试了一些使用前缀和后缀的组合,但还没有成功。

Event content filtering does not support wildcard pattern matching.事件内容过滤不支持通配符模式匹配。

If prefix or suffix matching does not work, consider overfetching and using the event target to screen out unwanted events.如果前缀或后缀匹配不起作用,请考虑过度获取并使用事件目标来筛选不需要的事件。

"key": [{"prefix": "LOAD"}]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM