应内部客户要求,尝试了一下S3 bucket的通知推送,这里记录一下。
分别使用了推送到SNS Topic和推送到Lambda(之后消费Gchat webhook)。
SNS Topic
S3-->Properties-->Events, Sent to SNS Topic.
需要注意的是,在SNS Topic里,需要修改policy让S3推消息,比如:
{
"Version": "2012-10-17",
"Id": "__default_policy_ID",
"Statement": [
{
"Sid": "publish-from-s3",
"Effect": "Allow",
"Principal": {
"Service": "s3.amazonaws.com"
},
"Action": "SNS:Publish",
"Resource": "arn:aws:sns:ap-southeast-1:xxxxxxxxx:testing-notification-hz