How to allow an S3 bucket to publish notification to a SNS topic?

Replace the resource and source ARNs with yours and amend it to the the access policy in SNS topic

{
"Version": "2008-10-17",
"Id": "example-ID",
"Statement": [
{
"Sid": "Allows an S3 bucket to Publish",
"Effect": "Allow",
"Principal": {
"Service": "s3.amazonaws.com"
},
"Action": "SNS:Publish",
"Resource": "arn:aws:sns:#######",
"Condition": {
"ArnLike": {
"aws:SourceArn": "arn:aws:s3:::#####"
}
}
}
]
}