Event bridge rule for specific file in the specific path of S3 bucket

0

Can we have event bridge rule for specific file in the specific path of S3 bucket instead of t=just path.

Like S3://sourcebucket123/config/remote123.xlsx

已提问 2 个月前139 查看次数
1 回答
1

Hello.

I think it would be best to create an EventBridge event rule in the following format.
https://docs.aws.amazon.com/AmazonS3/latest/userguide/ev-events.html

{
  "source": ["aws.s3"],
  "detail-type": ["Object Created"],
  "detail": {
    "bucket": {
      "name": ["s3-bucket-name"]
    },
    "object": {
      "key": [{
        "prefix": "test/"
      }]
    }
  }
}
profile picture
专家
已回答 2 个月前
  • If it's a specific file, I think you can do it like this:

    {
      "source": ["aws.s3"],
      "detail-type": ["Object Created"],
      "detail": {
        "bucket": {
          "name": ["s3-bucket-name"]
        },
        "object": {
          "key": [{
            "prefix": "config/remote123.xlsx"
          }]
        }
      }
    }
    
  • If it is a specific file, you don't even need the prefix: "key": ["config/remote123.xlsx"]

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则