2.11 SNS service in S3 bucket to send email notification on event Lab

Опубликовано: 19 Октябрь 2024
на канале: Bhoopendra Singh
180
6

Creating and Subscribing to SNS Topics, Adding SNS event for S3 bucket

Update the bucket policy as shown below:
Note:- Make sure you change the bucket name and ARN to the names of the instances you created earlier with bold one.

{
"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",
"SNS:Receive"
],
"Resource": "arn:aws:sns:us-east-1:368079326738:mysnsnotification",
"Condition": {
"ArnLike": {
"aws:SourceArn": "arn:aws:s3:*:*:techhaunt2020"
}
}
}
]
}