S3 Event Notifications automatically trigger actions when files are uploaded, deleted, or modified. This enables event-driven architectures where file activity kicks off downstream processing.
| Event | When Triggered | Example Use Case |
|---|---|---|
| s3:ObjectCreated | Any object creation (PUT, POST, COPY, multipart) | Process image after upload |
| s3:ObjectRemoved | Object deletion or version deletion | Audit file deletion, clean up thumbnails |
| s3:ObjectRestore | Restore from Glacier completed | Process restored archive |
| s3:Replication | Replication events (success/failure) | Monitor replication health |
| Destination | Use When | Pattern |
|---|---|---|
| Lambda | Immediate processing, transformation, validation | Upload photo → Lambda creates thumbnails |
| SQS | Queue for async processing, rate limiting | Upload CSV → SQS → batch Lambda processes records |
| SNS | Fan-out to multiple destinations | Upload → SNS → SQS email queue + SQS audit queue + Lambda |
# S3 Event Notification (JSON)
{
"LambdaFunctionConfigurations": [
{
"LambdaFunctionArn": "arn:aws:lambda:...:thumbnail-generator",
"Events": ["s3:ObjectCreated:*"],
"Filter": {
"Key": {
"FilterRules": [
{"Name": "prefix", "Value": "uploads/"},
{"Name": "suffix", "Value": ".jpg"}
]
}
}
}
]
}
For S3, EventBridge provides more advanced routing capabilities — multiple destinations, content-based routing, archive and replay. S3 native notifications are simpler and have lower latency.