September 21, 2023
Hi, I am Agata.
This time, I tried to set up Amazon S3 to send event notifications to Amazon SNS, but I got the error “Unable to validate the following destination configurations” and could not set it up. Here are the working notes.
This is a problem on the topic side of social networking.
By default, Access policy is not set to allow access from S3, so Access policy must be set to allow access to Amazon SNS topics from the S3 bucket side.
Follow the steps below to set the Access policy for an Amazon SNS topic.
{
"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>"
}
}
}
]
}
When you are finished, click the “Save Changes” button in the lower right corner to exit.
After this, if you set up notifications on the S3 side, you should be able to set them up without any problems.