Ref: https://learn.cantrill.io/courses/1820301/lectures/41301492
S3 Events - Architecture
Diagram: https://github.com/acantril/aws-sa-associate-saac03/blob/main/0700-SIMPLE_STORAGE_SERVICE(S3)/00_LEARNINGAIDS/S3EventNotifications.png
- 🔧 Get notified when certain events happen in your S3 bucket
- Examples: new object created, objected deleted, etc
- Can power event-driven architectures (EDAs)
- When events happen, they're sent as JSON objects to destination(s)
- Update
notification
subresource in the bucket with your desired configuration:
- Define destination for S3 events. 3 possible targets:
- Lambda functions
- SQS queues
- SNS topics
- ‼️ Destination/target needs an attached resource policy authorizing S3 Principal to interact with them!
- Define which events will be sent. Types of events that can be sent:
- Object created (
Put
, Post
, Copy
, CompleteMultiPartUpload
)
- Object deletion (
*
, Delete
, DeleteMarkerCreated
)
- Object restore (
Post (Initiated)
, Completed
) → restoring from Glacier (FR & DA)
- Object replication (
OperationMissedThreshold
, OperationReplicatedAfterThreshold
, OperationNotTracked
, OperationFailedReplication
)
- ‼️ S3 Events is an old & simple feature… Amazon EventBridge should be your DEFAULT for event-driven architectures (EDAs)!!
- EventBridge supports more types of events & more destinations/targets