I have to start stepMachine execution upon file upload on a folder inside bucket, I got to know how we can configure eventbridge on S3 bucket level. But on the same bucket there can be multiple file uploads. I need to get notified when object inserted into a particular folder inside bucket. Is there any possible way to achieve this?
Here is another solution. Since folders technically do not exist in S3 and merely a UI feature, "folders" in S3 are ultimately called prefixes.
You can trigger an EventBridge Notification on an S3 folder with the following event pattern:
{
"source": ["aws.s3"],
"detail-type": ["Object Created"],
"detail": {
"bucket": {
"name": ["<bucket-name>"]
},
"object": {
"key": [{
"prefix": "<prefix/folder-name>"
}]
}
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With