Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can i add more than 20 policy statements under SQS Queue - Permissions

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?

like image 495
nurav Avatar asked Oct 26 '25 16:10

nurav


1 Answers

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" ]
    }
like image 170
guest Avatar answered Oct 28 '25 07:10

guest