Tom Ron
Tom Ron

Reputation: 6181

SNS multiple subscribers

We have an SNS queue with multiple subscribers (2 * SQS, 1 * email, etc.). However, we only get the notification for the last subscriber. I.e. when each of them is registered alone we get to notification. So as far as I understand each of them alone is configured all right.

I didn't find any relevant AWS documentation about it (limit of subscribers, policies, etc.)

Would love to hear any hint about it. Thanks in advance.

Solution: the issue was the order in which the SQS permission-subscription was created in. The correct order is detailed here. If you do step 3 before 2 it won't work.

Upvotes: 2

Views: 6163

Answers (2)

Tom Ron
Tom Ron

Reputation: 6181

The issue was the order in which the SQS permission-subscription was created in. The correct order is detailed here. If you do step 3 before 2 it won't work.

Upvotes: 2

alphojo
alphojo

Reputation: 630

{
  "Version": "2012-10-17",
  "Id": "arn:aws:sqs:us-east-1:<account-number>:<sqs-name>/SQSDefaultPolicy",
  "Statement": [
         {
        "Sid": "<sid>",
        "Effect": "Allow",
        "Principal": "*",
        "Action": "SQS:SendMessage",
        "Resource": "arn:aws:sqs:us-east-1:<account-number>:<name>",
        "Condition": {
                "ArnEquals": {
                      "aws:SourceArn": "arn:aws:sns:us-west-2:<account-number>:*"
                     }
                }
          }
     ]
}

Here * is the key. It allows other sns to write to the same queue.

Upvotes: 0

Related Questions