Is there any way to publish a topic from Amazon SNS to multiple mobiles with Baidu cloud service?
Currently, when publish a message from SNS to baidu, I need specify EndpointArn which created with userid and channelid information. These information represent a mobile device.
==> I only publish from SNS to a specific mobile device represented by userid and channelid.
But I need publish a topic from SNS to multiple mobile devices which registered the topic.
I tried: smart phone register a topic (example: hello) to Baidu then SNS publish the same topic (hello) to Baidu. But the smartphone COULD NOT receive the topic message from SNS.
Anybody know how to make it work?
I just faced this problem, but finally find out it is required to set the following three message attributes for it to work:
AWS.SNS.MOBILE.BAIDU.DeployStatus
AWS.SNS.MOBILE.BAIDU.MessageType
AWS.SNS.MOBILE.BAIDU.MessageKey
Here is the reference:
https://docs.amazonaws.cn/sns/latest/dg/SNSMobilePushBaiduPublish.html
Related
I live in India and I have this requirement where I need to change the default sender Id of text messages sent via AWS SNS to the one that is registered for our organization with TRAI. We are trying to send SMS text messages to customers with Indian mobile numbers. I tried passing TemplateID and EntityId that was issued to us by our provider on the AWS console to manually test things out by unfortunately, whenever I receive text message on my mobile, the sender name still shows a random number assigned by AWS and not the sender id that I configured. I also made sure that the template message approved by TRAI is exactly the same but it did not work either. There are no error logs on AWS either because the message was successfully delivered. Its just that the sender id is not the one that I had configured it to be.
Any help on this topic would be much appreciated. Thanks in advance!
P.S. We registered our template on JIO which is a Telecom provider here in India.
You can't use AWS SNS for this. You have to use AWS Pinpoint if you want to use your specific number. With Pinpoint you can also use short-codes and long-codes and can also configure your messages to be promotional or transactional. You can set your sender id in AWS pinpoint as well. Check the documentation below on how to do that.
https://docs.aws.amazon.com/pinpoint/latest/userguide/channels-sms-awssupport-sender-id.html
It doesn't matter if you have any registration with any telco providers as AWS will use it's own infra to send the messages. So you either have to use 100% AWS solution or 100% telco provider services. You can't mix and match both for SMS sending use-case.
UPDATE:
Well SNS and Pinpoint are 2 different services for 2 different use cases. SNS is only for "notifications" and Pinpoint is like a communication service.
As far as sender-id in SNS is concerned, some countries require it as a hard requirement. You can read more about it in the documentation below:
https://docs.aws.amazon.com/sns/latest/dg/channels-sms-awssupport-sender-id.html
AWS SNS does support using sender IDs together with template and entity IDs for targeting India. If you follow the instructions at https://docs.aws.amazon.com/sns/latest/dg/channels-sms-senderid-india.html, you'll be able to do this.
I'm working on Amazon SNS and I've hit a wall in how to publish message to all endpoints registered to a specific application platform.
Do I have to create a topic that includes all target endpoints and publish to it?
What you can do in this case is to create an SNS topic and subscribe all endpoints to the topic. That way, whenever you publish a message to the topic, SNS will handle fanning it out to all subscribed endpoints for you.
I am working on an app on AWS that needs to send text messages to customers. At times, the app just needs to send a single text message (AWS Transactional SMS may help here), at times it may need to text different groups of people (AWS doesn't seem to have a solution for this use case). It all depends on what the user is doing on the app.
I have explored the possibility of using SNS, but it requires users to be subscribed to a topic, which doesn't work for my use case. I have explored the possibility of using AWS Pinpoint, but it also doesn't seem to apply to my use case. I could use Twilio, but I would prefer to stay within AWS (Additionally, Twilio runs on AWS)
What is the best way to send text messages in the USA through AWS that doesn't require subscription to a topic?
If someone seeking for the answer of this Qn:
You can send SMS in 2 ways in AWS SNS.
Subscribe to a topic that is created in AWS SNS and send sms to all those numbers who had the subscription
Send SMS directly to a mobile number
What you need is the 2nd one.
I will demonstrate here how to do that with Ruby language.
Install the gem aws sns:
gem install aws-sdk-sns
require 'aws-sdk-sns'
1.Set SNS client
#sns_client = Aws::SNS::Client.new(
region: ENV['AWS_SNS_REGION'],
access_key_id: ENV['AWS_SNS_ACCESS_KEY'],
secret_access_key: ENV['AWS_SNS_SECRET_KEY']
)
2.Set SNS client attributes
#sns_client.set_sms_attributes({
attributes: {
'DefaultSenderID' => SENDER_ID,
'DefaultSMSType' => SMS_TYPE
}
})
3.Publish SMS
otp = (1000..9999).to_a.sample
#sns_client.publish({
phone_number: #mobile_no,
message: "#{OTM_MSG} #{otp}"
})
thats it!
OTM_MSG: ‘Your message comes here’
SMS_TYPE : ‘Transactional’ or ‘Promotional’
If you want to send OTP / bank transactions, then it is ‘Transactional’. Else if you want to send some promotional sms of your product then it is ‘Promotional’
SENDER_ID: is the sender id that you have already registered if you want to use your own sender id.
If you don't have sender id skip the step 2 - Set SNS client attributes
AWS_SNS_REGION, AWS_SNS_ACCESS_KEY, AWS_SNS_SECRET_KEY - are the credentials of your AWS account from where you would like to use SNS.
See the AWS documentation for this here:
https://docs.aws.amazon.com/sns/latest/dg/sms_publish-to-phone.html
It also provides code for Java language.
If you want to know more I have written an article here:
https://railsdrop.com/2021/03/04/aws-sns-how-to-send-sms/
Use the Publish action from the SNS service to send a text to a single phone without a topic. You could repeatedly call Publish to send texts to multiple phones.
https://docs.aws.amazon.com/sns/latest/dg/sms_publish-to-phone.html
Use the CreateTopic, Subscribe, and Publish actions from the SNS service to send a text to a multiple phones at once (uses a Topic).
https://docs.aws.amazon.com/sns/latest/dg/sms_publish-to-topic.html
I want to send notifications via email through Azure function apps. In AWS we have SNS, using boto3 we can send notifications to a particular topic and all the subscribers for that topic will receive notifications. Is there any similar kind of service in Azure that helps to send notifications to topics.
Does AWS offer a service for real-time publish&subscribe messaging for end clients? (web, mobile, desktop).
I'm looking for something that is topic based, optionally with a statfull model of data, where clients can subscribe to topics, receive data published on these topics at real time, etc.
(similar to what Google Firebase offers).
Thanks.
Yes. Amazon Simple Notification Service (SNS) provides:
Topic creation
Publishing of messages to the topic
Subscription to a topic via:
Email
HTTP/S endpoint (effectively, a REST call)
SMS
Sending to an Amazon SQS queue
Triggering an AWS Lambda function
Sending mobile notifications (iOS, Android, Baidu, Windows mobile, Windows desktop, Mac desktop)