S3 Event Notifications
Send an event to Lambda, SNS, SQS or EventBridge when something happens to an object.
How it works
S3 Event Notifications sends messages for selected object events, such as object creation, deletion, or restoration. S3 can send notifications directly to AWS Lambda, Amazon SNS, or Amazon SQS; you can also send events to Amazon EventBridge. Direct notification configurations support object key prefix and suffix filters. Processing is asynchronous, and consumers should account for duplicate notifications.
When to use it
React to uploads or deletions, for example generate thumbnails of uploaded images.
Real-world example
A photo application configures an object-created notification for the uploads/ prefix to invoke Lambda. The function creates thumbnails and writes them under the thumbnails/ prefix to avoid triggering the same workflow again.
Key facts
- Events: ObjectCreated, ObjectRemoved, ObjectRestore, Replication…
- Object key filtering by prefix or suffix, such as .jpg; wildcards are not supported.
- Typically delivered in seconds, sometimes a minute or longer.
- Direct Lambda, SNS and SQS destinations need resource policies that allow S3.
- EventBridge adds advanced filtering, multiple destinations, archive and replay.
Common pitfall
If Lambda writes results to the same bucket and the new keys match the input filter, events can invoke the function repeatedly. Use a separate output bucket or prefix to avoid a loop.
Often confused with
S3 Batch Operations — notifications react to new events; Batch Operations act on existing objects.
References
Prepared by Cloud Quest. Check current behavior and limits in the AWS documentation:
Keywords you will see in SAA-C03 questions
- upload triggers a function
Understand it for real with 3D models and simulated labs
Connect the concept to a working architecture.