Articles → AWS → AWS S3 Event Notification
AWS S3 Event Notification
Steps
- Create an SNS topic and subscription
- Create an S3 bucket
- Update the S3 access policy of the SNS topic
- Create an event notification in the S3 bucket
- Upload the file
- Email notification
Create An SNS Topic And Subscription
Click to Enlarge
Click to Enlarge
Create An S3 Bucket
Click to Enlarge
Update The S3 Access Policy Of The SNS Topic
Click to Enlarge
Click to Enlarge
{
"Version": "2008-10-17",
"Id": "__default_policy_ID",
"Statement": [
{
"Sid": "__default_statement_ID",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": [
"SNS:GetTopicAttributes",
"SNS:SetTopicAttributes",
"SNS:AddPermission",
"SNS:RemovePermission",
"SNS:DeleteTopic",
"SNS:Subscribe",
"SNS:ListSubscriptionsByTopic",
"SNS:Publish"
],
"Resource": "arn:aws:sns:ap-south-1:462618770999:mytopic",
"Condition": {
"ArnLike": {
"aws:SourceArn": "arn:aws:s3:::gyansangrah-bucket"
}
}
}
]
}
Create An Event Notification In The S3 Bucket
Click to Enlarge
Click to Enlarge
Click to Enlarge
Upload The File
Click to Enlarge
Email Notification
Click to Enlarge