
EventBridge Rules can be used to do something when something occurs. Crystal clear, eh?
For example, EventBridge could be used to publish a message to one of your Simple Notification Service (SNS) Topics when a file is deleted in one of your S3 Buckets.
First, let's create an EventBridge Rule for S3.
For the Event Pattern, let's go with all S3 events.
And let's publish a message to one of your Simple Notification Service (SNS) Topics. If you don't have an SNS Topic, check out my article Create Simple Notification Service (SNS) Topics using the AWS CLI.
That was easy. You should now see the EventBridge Rule. Nice!
Now, on the Properties tab of one of your S3 Buckets, let's set Amazon EventBridge to On.
And that's it. Now, when any change is made in the S3 Bucket, an event should be sent to EventBridge, the Rule should match, and a message should be published to the SNS Topic. For example, I was subscribed to the SNS Topic, and I got an email in my inbox like this.
Did you find this article helpful?
If so, consider buying me a coffee over at