SNSトピックにS3からのアクセスポリシーを追加する

{
"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:<Region>:<AccountID>:<Topic>",
"Condition": {
"StringEquals": {
"AWS:SourceOwner": "<AccountID>"
}
}
},
{
"Sid": "S3-policy",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": "SNS:Publish",
"Resource": "arn:aws:sns:<region>:<AccountID>:<Topic>",
"Condition": {
"StringEquals": {
"AWS:SourceArn": "arn:aws:s3:::<BucketName>"
}
}
}
]
}

 

関連記事

記事タイトル検索