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

gefragt vor 2 Monaten139 Aufrufe
1 Antwort
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
EXPERTE
beantwortet vor 2 Monaten
  • 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"]

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen