Amazon SNS Mobile Push - how to bulk subscribe endpoints to a topic?

与世无争的帅哥 提交于 2019-12-03 02:18:40

It sounds like you have created the Amazon SNS Platform Application and imported your tokens as Amazon SNS Platform Endpoints.

What kind of notification are you sending?

  • If you send a custom message to each user, use Direct Addressing. With this approach, you Publish to each EndpointARN.

  • If you send the same message to all users, use topics. You need to subscribe your endpoints to a topic. When you are ready to send, Publish to the TopicARN. Amazon SNS will handle delivery to all endpoints subscribed to that topic. Amazon SNS currently does not provide a bulk subscribe API, so you will have to invoke Subscribe once per EndpointARN.

Full disclosure: I work for AWS on Amazon SNS.

Unfortunately there is no way so far... see Bulk push endpoints subscription to a topic on AWS Discussion Forum.

Hi there langelvicente,

Thanks for this feature request. I've passed this back through to the SNS Service Team for review.

Best regards, Phil P

This is now possible with subscribing mobile endpoints to topics. The default subscriber limit was increased.

Q: Are there limits to the number of topics or number of subscribers per topic?

By default, SNS offers 10 million subscriptions per topic, and 3,000 topics per account. To request a higher limit, please contact us at at http://aws.amazon.com/support

http://aws.amazon.com/sns/faqs/?nc2=h_ls

If you have an application full of endpoints which you want to bulk subscribe to a SNS topic you can do so from the AWS SNS dashboard by:

  1. Going to that application in SNS
  2. Waiting until the 'total items' count at the bottom has completed its count (ie all items are listed)
  3. Checking the select all check mark above the list of endpoints (screenshot attached)
  4. Tap on platform action > subscribe endpoints to topic
  5. Enter your topic ARN and click create subscription

The process will begin and it will stall your web browser but let it be as it takes time and if you want to see the subscriptions to the topic increasing you can use the AWS CLI with :

 aws sns get-topic-attributes --topic-arn "[YOUR TOPIC ARN]"

note the "SubscriptionsConfirmed" value

Yes, but caveat: they each must accept your effort to enroll them into push messaging. That means that for each token in your database, each individual must consent to receiving future messages from you (via SMS and email, that is).

Each address (tel #, email) becomes an endpoint, and you can use SNS to create a topic, then subscribe each endpoint. After a confirmation email is sent to each endpoint (person on your list), they must confirm, in order to begin receiving your stream of messages via text or email.

Unfortunately, this confirmation/consent event is dicey, and must be handled correctly. Your ARN's title must be succinct (7 letter via SMS, no subject line allowed). Hence, you must contact them via SMS using a name they will recognize (the SMS message will arrive via short code, 304-something), and can be refused and/or blocked.

Not trivial! Best to investigate using push messages via mobile app. This will avoid the coveted SMS space, but you might consider putting out a blast to email and/or SMS, in order to get them using your mobile app. Apparently, given the immediacy of SMS, folks will be reading your first confirmation within 20 seconds. This could be a good thing, if they confirm, then accept your future messages.

Am doing this right now, and am preparing to be recognized by name using my initial blast -- apps that create anonymous SMS will be banned through iTunes!

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