We have more than 20 S3 buckets in our environment and i have a SQS queue. Now i want an event should get triggered to SQS event when ever a file is placed in S3 Bucket.
Issue i am encountering:
I can add only max of 20 policy statement to the SQS queue(i.e. i can add only 20 buckets under SQS queue - permission tab)
{
"Version": "2012-10-17",
"Id": "11111111",
"Statement": [
{
"Sid": "11111111111",
"Effect": "Allow",
"Principal": "*",
"Action": "sqs:SendMessage",
"Resource": "arn:aws:sqs:us-east-1:1111111111:myqueue",
"Condition": {
"ArnLike": {
"aws:SourceArn": "arn:aws:s3:*:*:mys3bucket"
}
}
}
Is there any way i can add more than 20 buckets?
You can use multiple values in a condition. The following should work for you:
"Condition": {
"ArnLike": {
"aws:SourceArn": [ "arn:aws:s3:*:*:mys3bucket", "arn:aws:s3:*:*:others3bucket" ]
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With