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

feita há 2 meses139 visualizações
1 Resposta
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
ESPECIALISTA
respondido há 2 meses
  • 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"]

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas