AWS EventBridge Rule for S3 Uploads


Below EventBridge rule will be triggered based on the following conditions:

  1. Files uploaded to myexample bucket.
  2. Inside a specific prefix some/folder/path/.
    • Including subfolders under the prefix
{
  "source": ["aws.s3"],
  "detail": {
    "eventSource": ["s3.amazonaws.com"],
    "eventName": ["PutObject"],
    "requestParameters": {
      "bucketName": ["myexample"],
      "key": [{
        "prefix": "some/folder/path/"
      }]
    }
  }
}

You can test the invitation by setting a Lambda function as the target and printing the `event`.


Leave a Reply

Your email address will not be published. Required fields are marked *