Amazon S3 Event Notifications
S3 Event Notifications is a feature that allows us to be notified when specific events happen in our S3 bucket, such as when an object is created, deleted, or a replication event occurs.
Some of the Event types
We can configure notifications for various event types such as:
Destinations of the Notification
SNS topic: Broadcast the notification to multiple subscribers.
SQS queue: Store the event messages in a queue.
Lambda function: Automatically invoke a Lambda function to process the event in real time.
Amazon EventBridge: publish the event to a serverless event bus and the event can be forwarded to over 18 AWS services as destinations. We can also have advanced filtering options with JSON rules (by inspecting the object metadata, size, and name…). EventBridge can also archive, and replay events with reliable delivery)
?
领英推荐
IAM Permission for each Destination
We are not using IAM roles, instead, we use resource access policy for each type of destination (these policies are similar to S3 bucket policies)
For SNS, SQS, and Lambda, we need to grant S3 the necessary permissions to call API to publish messages to an SNS topic, an SQS queue, or a Lambda function.
On the other hand, S3 does not require any additional permissions to deliver events to EventBridge.
Why use S3 Event Notifications?
Automated Processing
Monitoring and Auditing
Decoupled Architecture
Use cases
Image Processing
Data Archiving
Replication Monitoring