Bootstrap FreeKB - Amazon Web Services (AWS) - Getting Started with EventBridge Rules
Amazon Web Services (AWS) - Getting Started with EventBridge Rules


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 Buy Me A Coffee



Comments


Add a Comment


Please enter 70f2c3 in the box below so that we can be sure you are a human.