AWS Under the Hood — Day 11 — Monitor Your S3 Bucket: Get Notified on every S3 event

Prashant Lakhera
3 min readMay 2, 2024

This is a common requirement: You need to be notified of events such as someone deleting or uploading an object to your S3 bucket. Often, we begin writing our own Lambda functions, but AWS provides its two-managed solutions for these notifications. They are:

AWS S3 Event Notifications

AWS S3 event notifications are specifically designed to respond to changes in an S3 bucket, such as the creation, deletion, or modification of objects.

  • Use Case: S3 event notifications are best when responding to changes in an S3 bucket directly and primarily route the events to S3-related workflows (e.g., processing uploaded files and logging deletions).
  • Features:It is triggered by specific S3 bucket operations like PUT, POST, DELETE, and others.Target AWS Lambda, SNS, SQS, and other AWS services directly.Simpler to set up for specific S3 bucket events without a broader event management system.Ideal for workflows that are directly connected to object storage activities

To Configure S3 events

  1. Sign in to the AWS Management Console and open the Amazon S3 console at
  2. In the Buckets list, choose the name of the bucket that you want to enable events for.
  3. Choose Properties.
  4. Navigate to the Event Notifications section and choose Create event notification.
  5. In the General configuration section, specify descriptive event name for your event notification. Optionally, you can also specify a prefix and a suffix to limit the notifications to objects with keys ending in the specified characters.

6. In the Event types section, select one or more event types that you want to receive notifications for.

  1. Choose Save changes, and Amazon S3 sends a test message to the event notification destination.


AWS EventBridge for S3

EventBridge can be configured to listen to events from an S3 bucket as a part of its broader event management capabilities. When using EventBridge with S3:

  • Integration: EventBridge requires integration with S3, which is achieved by attaching a resource-based policy to the S3 bucket, which enables the bucket to send events to EventBridge.
  • Flexibility: EventBridge allows more complex routing and event filtering rules. You can filter and route S3 events based on their detailed attributes, such as object size, timestamp, and more.
  • Targets: EventBridge can route events to a wider range of AWS services than S3 event notifications. It can also trigger workflows in other AWS services directly or integrate with third-party services.
  • Setup: Setting up EventBridge to handle S3 events can involve more than direct S3 event notifications. It typically involves creating an event bus, setting up rules, and ensuring proper permissions.

Choosing Between Them

Using EventBridge for S3 events provides greater flexibility and a more centralized approach to managing events across multiple sources and AWS services. It’s handy in complex applications where events from various services need to be orchestrated in sophisticated ways.

Direct S3 event notifications, meanwhile, offer a simpler and sometimes quicker way to respond to changes in S3 if your needs are relatively straightforward and limited to actions directly related to objects in your buckets.

Each method has its strengths, and the choice depends on your specific needs, the complexity of your environment, and how you plan to handle events across your AWS infrastructure.



Prashant Lakhera

AWS Community Builder, Ex-Redhat, Author, Blogger, YouTuber, RHCA, RHCDS, RHCE, Docker Certified,4XAWS, CCNA, MCP, Certified Jenkins, Terraform Certified, 1XGCP