SNS multiple subscribers

情到浓时终转凉″ 提交于 2019-12-11 06:06:56

问题


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.


回答1:


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.




回答2:


{
  "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.



来源:https://stackoverflow.com/questions/39244881/sns-multiple-subscribers

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!