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

demandé il y a 2 mois139 vues
1 réponse
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
EXPERT
répondu il y a 2 mois
  • 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"]

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions