Amazon AWS SNS: How to segment within a topic? - amazon-web-services

Is it possible to segment or send to a sub section of a topic (using SMS)? We have an application where we are sending "alerts" (not marketing messages) where we may have 10K names on a topic but only want to send to 1-2K. The messages are time sensitive and we won't know in advance that we'll need to send them. My original plan was to subscribe them to the topic and point of purchase and then send to just the portion that need it but I can't figure out how that might happen even using message attributes (again for SMS). I'm using SDK version 3.17 with the API version '2010-03-31'.

Individually-addressable endpoints are only usable for Mobile Push. All of the other transports available through SNS are topic-centric only -- all topic subscribers receive all messages for HTTPS, Email, SQS, and SMS.
The answer is actually found in the "mobile push" section of the FAQ, presumably because those other transports were already established with this limitation when SNS introduced mobile push, which has a feature not available for other transports.
Q: Does SNS support direct addressing for SMS or Email?
No. At this time, direct addressing is only supported for mobile push endpoints (APNS, GCM, ADM, WNS, MPNS, Baidu)
http://aws.amazon.com/sns/faqs/#mobile-push-notifications

Related

Do I have to change to AWS Pinpoint to use 10DLC for sending SMS messages or can I still use AWS SNS

Brief Description:
What is an unregistered long code when it comes to an application sending SMS messages?
Plus, I'm using AWS SNS to send text messages through a node js application. Do I have to switch to Amazon Pinpoint to send to SMS messages?
Detailed:
I got an email from AWS saying that the US telecom carriers would no longer support sending Application-To-Person (A2P) SMS messages over unregistered long codes
It then says If you are using long codes, Amazon strongly recommends that you complete the transition to toll free numbers, 10DLC, or short codes.
In addition to that it appears that AWS wants me to use Amazon Pinpoint to send sms messages and email. And the deadline to make the change is on June 1, 2021.
First off, whats an unregistered long code? I imagine those are the long international phone #'s you'd see for someone in Europe or Latin America. But to be sure I looked at AWS's docs and don't really see an example of one.
I have a node app running on an EC2 instance that uses AWS SNS to send messages to US text messages based off certain business logic. The phone numbers in the config files have the following format: US Country Code - 10 Digit phone Number so an example is +13215441222 which is a 10DLC plus the us country code.
In other words, my app is already sending text messages using 10DLC but its doing so using AWS SNS. So do I even have to do anything that the AWS email recommends?
I don't have aws support to ask them this question so I'm asking it here.
In addition to that it appears that AWS wants me to use Amazon Pinpoint to send sms messages and email.
You can still use SNS to send SMS messages, either using 10DLC, short codes or toll-free.
First off, whats an unregistered long code?
It is any number used in application-to-person (A2P) SMS messaging not registered with The Campaign Registry (TCR)
Let me quote documentation:
In order to use a 10DLC number, first register your company and create a 10DLC campaign using the Amazon Pinpoint (not Amazon SNS) console. AWS shares this information with The Campaign Registry, a third party that approves or rejects your registration based on the information. In some cases, registration occurs immediately. For example, if you've previously registered with The Campaign Registry, they might already have your information. However, some campaigns might take one week or longer for approval. After your company and 10DLC campaign are approved, you can purchase a 10DLC number and associate it with your campaign. Requesting a 10DLC might also take up to a week for approval. Although you can associate multiple 10DLCs with a single campaign, you can't use the same 10DLC across multiple campaigns. For each campaign you create, you need to have a unique 10DLC.
Reference: https://docs.aws.amazon.com/sns/latest/dg/channels-sms-originating-identities-10dlc.html
So do I even have to do anything that the AWS email recommends?
Yes, you need to switch to 10DLC, toll-free or short codes.
Short codes reference: https://docs.aws.amazon.com/sns/latest/dg/channels-sms-originating-identities-short-codes.html
Blog post about 10DLC: https://aws.amazon.com/blogs/compute/provisioning-and-using-10dlc-origination-numbers-with-amazon-sns/

pub/sub : how can I use pub sub to check message in any email account?

I am new to pub/sub on GCP and have some difficulties on understanding some concepts. So if I want to get email every time I have new message in my mailbox, can I use Pub/Sub for that? How the push notification work in that case? I understand the subscriber concepts but I have some difficulties in the publisher concepts. Can anyone help?
Although I am not familiar with the Gmail API (I am specialized mainly in GCP), a quick read over the documentation can provide some really useful insights about this topic. Also, as per your question, I think your doubts are more related to Pub/Sub itself, rather than Gmail API, so let me try to clarify some things for you.
I can see in the Gmail API documentation, that you can configure Gmail to send push notifications using Cloud Pub/Sub topics, in such a way that Gmail sends publish requests to a Pub/Sub topic whenever a mailbox update matches the configuration you established. Although I cannot get into much details about this part of the scenario, from the documentation I understand that the way to configure the Gmail push notifications is to make a watch() request with the configuration you want and pointing a Pub/Sub topic that you should have previously created. Once this is set (and also permissions are correctly configured), Gmail would keep publishing mailbox message updates for a period of 7 days (after a week, you have to re-call watch()).
In order to receive notifications, you can now forget completely about the Gmail API, and you can focus on Pub/Sub. You should create a Pub/Sub subscription (using either Pull or Push configuration, depending on your requirements), so that your client (wherever and whatever it is) receives the Pub/Sub messages that work as a notification. You may have to acknowledge the messages so that they are not retried, too.
As a side note, given that you mentioned that the Pub/Sub subscriber concepts are more or less clear to you, and you would like to know more about publishing, let me share with you some links that may come in handy for a better understanding of the environment:
Pub/Sub main concepts.
Typical Pub/Sub flow.
General guide for Pub/Sub publishers.
In the scenario you are presenting (Gmail notifications using Pub/Sub), you would have to create a topic (with the name you want, let's name it gmail_topic), and the Gmail API would be your publisher. What the watch() method would be doing, behind the scenes, is calling the publish() method to send messages (containing information about mailbox updates) to your topic gmail_topic. Messages are passed to Pub/Sub subscriptions (which you can create and bind to the gmail_topic), and they retained in each of the subscriptions for 7 days (the maximum retention period) until you consume and acknowledge them.

Best way to retrieve active calls without making request each second?

We need to create a monitor that will show any income calls in our extranet in live time.
We were able to show active calls by using /account/~/extension/~/active-calls, however, to achieve what we need we would need to make a request each second which I guess will be blocked by rate limits.
Is there a better solution for it?
Thanks
Subscription (Push Notification) API resource empowers developers to enable the client application(s) to create a single subscription (to one or more extension's) and continually receive push notifications in real time for each subscribed extension.When using this approach for your application(s) to receive events on your RingCentral account, no polling is involved.
You can create a subscription using either of the below-mentioned transportType for receiving push notifications:
PubNub
WebHook
Notifications which the client wants to receive can be specified by the event filters which are set in the subscription request. The event filter is exposed as a URL, pointing to the required RingCentral API resource. Currently the following event types are available for notifications: extensions, messages and presence. They are described in detail below:
Notifications Event Types
You can take a look at the Subscription API below:
Subscription API
If you are interested in Subscribing to Push notifications via WebHook then we have an Easy-to-follow Quickstart guide here:
RingCentral Webhooks Quickstart Guide

Amazon SES: Procedure for handling complaint notifications?

I don't have a ton of experience with Amazon SES. For a client of mine, I maintain a small subscription list (about 1300 people) and I use Amazon SES to send messages through from the WordPress blog that this group is subscribed to, whenever there is a new post. Every so often I get complaint notifications from Amazon, but there is no identifying info to tell me who the complaint is from so that I can remove them from my list. How can I use those emails (or some other part of SES) to effectively remove these recipients? I have no intention of sending to anyone who doesn't want to receive these emails (even if they have not unsubscribed on the blog directly), but I can find no way of addressing these complaints.
The messages contain (in addition to the content of the email), information like the following:
User-Agent: ReturnPathFBL/1.0
Abuse-Type: complaint
Arrival-Date: Thu, 17 Aug 2017 10:22:08 +0000
Feedback-Type: abuse
Version: 1
Source-IP: 54.240.27.23
Original-Rcpt-To: 8516be265e1454635b9a5885efb329a4#comcast.net
Original-Mail-From: 0101015defb6e57b-8068a1db-1011-407e-af0c-1bf96aa38c5f-000000#us-west-2.amazonses.com
Reported-Domain: comcast.net
UPDATE
This is maddening. I have now setup an endpoint on my server, and when subscribed to SNS topic I correctly receive logs that I have been subscribed. But then...NOTHING. I still get the useless emails, but I get zero SNS notifications, despite being verified. Still investigating.
UPDATE II
Success!! It turns out that setting up SNS (or email notifications) on the DOMAIN was meaningless. I had to set it up specifically on the EMAIL SENDING ADDRESS. This was CRUCIAL but not at all obvious (at least to me)
Your question been addressed in amazon blog.
https://aws.amazon.com/blogs/ses/tag/abuse-complaint/
Make sure you are following the procedure to handle bounces and complaints from amazon aws.

How to subscribe a topic in WSO2 MB 3.1.0

I've been working with the WSO2 Message Broker for a while and I clearly understood the way of publishing and consuming a message to and from a queue as well topics. According to this, it has not been mentioned anywhere how could I subscribe to a particular topic from the management console where as this particular section talks about creating durable subscriptions from the code level.
But then the older version of this has a way to subscribe from the console it self. Am i missing anything? Any help would be appreciated.
Using WSO2 MB 2.2.0 is not advisable since it is a deprecated release.
Regarding the Problem,
Subscribing to a particular topic from the management console is not a valid use case since if you subscribe to a relevant topic using the management console to which consumer the messages should be pushed to?
The subscribing you mentioned in MB 2.2.0 is to subscribe to a particular topic from the management console for WS-Eventing where you can subscribe a topic to a given event sink.
WSO2 MB no longer support this.
Thanks,
Kamidu.