I'm trying to send an SMS(Text message) to a specific mobile number(IN : India, FROM : India) from the AWS management console. I have tried several times, from several regions but none of the messages has been delivered but it shows
SMS message published to phone number +91xxxxx successfully.
but the delivery statistics show that the messages have been failed.
Note: I'm using a root user account.
I'm new to AWS.
Any help will be really helpful.
there are special requirements when sending messages to recipients in India. Verify if you are using message type as Transactional. Because Promotional might be blocked on default settings.
https://docs.aws.amazon.com/sns/latest/dg/channels-sms-senderid-india.html
you will need to adhere to it before using AWS SNS in India.
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 can't able to send the Text messages using Amazon Simple Notification Services(SNS). I have tried with API and Amazon Console. Both are not working. Please help me to solve the issues.
I am using Amazon Free plan account.
Amazon Sns support two diffrent type of messages
Promotions message
Transaction message
If your mobile register do not disturb or many service provider not allowed promotions messages like Verizon
Map<String, MessageAttributeValue> smsAttributes =
new HashMap<String,MessageAttributeValue>();
smsAttributes.put("AWS.SNS.SMS.SMSType",new
MessageAttributeValue().withStringValue("Transactional").withDataType("String"))
To discover why an SMS message was not sent, you can enable logging in CloudWatch Logs.
From Viewing Amazon CloudWatch metrics and logs for SMS deliveries - Amazon Simple Notification Service:
You can collect information about successful and unsuccessful SMS message deliveries by enabling Amazon SNS to write to Amazon CloudWatch Logs. For each SMS message that you send, Amazon SNS will write a log that includes the message price, the success or failure status, the reason for failure (if the message failed), the message dwell time, and other information.
I did this recently to discover why my SMS was not successful. The message said that my carrier refused the message. I discovered that this was because I was using a Custom Sender ID. Once I removed that setting, I could successfully send SMS messages.
I have requested a dedicated long code. But Whenever I send SMS to this Dedicated long code with Keywords, nothing is happening. I am not receiving any automated response messages (Response messages setup in the AWS Pinpoint Console). The dedicated number is for INDIA and region is AWS MUMBAI REGION.
I have also created SNS which is not at all getting triggered for incoming SMS for this dedicated number. I will provide additional details, if wanted. Please guide me to debug this issue.
I would like to send a verification code to a specific user (only one) via email or text message. I have successfully done so through Amazon SES but I have not attempted through Amazon SMS yet. I have found myself going down the rabbit hole of investigating AWS Pinpoint.
It seems to me Pinpoint is meant for mass user messaging (text/email) rather than one-of individual messaging. I'm hoping I gathered that correctly.
My question, is there an advantage/disadvantage of using Pinpoint over Amazon SES and SMS for my use case?
This may be addressed by the Pinpoint FAQ
Q: I already use Amazon SNS or Amazon SES. What do I gain by switching
to Amazon Pinpoint?
In typical Amazon SNS and Amazon SES use cases, you have to set up
your application to manage each message's audience, content, and
delivery schedule. These same features are built in to Amazon
Pinpoint. With Amazon Pinpoint, you can create message templates,
delivery schedules, highly-targeted segments, and full campaigns.
Pinpoint also appears to be able to push notifications to users through the users preferred contact mechanism. This means that you are not limited to SMS and you reach your users with activation codes through the means they want to be reached. It also allows two-way communication.
The Pinpoint homepage also says:
You can send direct messages—such as order confirmations, welcome
messages, and one-time passwords—using the console or the Amazon
Pinpoint REST API. You can also use the API to build custom
applications that deliver campaign and transactional messages across
multiple channels.
This suggest it is suitable for your uses, though it has additional mass-communication features you do not currently need.
In addition to above points mentioned by #Freiheit you can send and receive SMS messages through Amazon Pinpoint. This will help you to track user response and create surveys, reviews and quiz like scenarios.
Check this AWS Documentation link
Normally our application is sending transactional SMS via us-west-2 and us-east-1.
Sending limits are not exceeded.
Some days ago sending transactional SMS stopped working. About 12 hours later the AWS CloudWatch logs show the error: "Unknown error attempting to reach phone".
The phone numbers received SMS successfully in the past. The receivers are located in Germany.
Unfortunately, the API's response code is 200 (success), even though the SMS is not sent successfully.
Very surprisingly, some SMS is sent successfully. But most SMS are resulting in the before mentioned error.
Even sending transactional SMS via AWS SNS Console are not working. The green Flash-Message is indicating a success, however, no SMS is sent.
What is causing this error?
Are there possibilities to detect failed SMS in our application?
Since some SMS are sent successfully but most of the SMS are resulting with the error:
Unknown error attempting to reach phone
I would strongly suggest that you contact AWS Premium Support to help you identify why SMS sent are not being delivered.
I had the same issue and I solved this way
Context
Allow AWS Cognito send SMS messages for SMS MFA codes.
Solution
Step 1
Open the AWS Support console
Create a new Service Limit Increase case
Here's an example possible values
Limit Type -> SNS Text Messaging
Fill in all of the optional fields, even if the system's url is your test environment.
Use case description -> AWS Cognito is indicating me that "To send SMS messages for verification or MFA, you must request a spending limit increase".
How do your customers opt to receive messages from you? Provide specific information about the opt-in process -> When setting up an account a user is asked to setup their Multi-factor authentication.
Please provide the message template that you plan to use to send messages to your customers -> "Your authentication code is {####}"
Region -> Select your desired region
Resource Type -> General Limits
Limit name -> Exit SMS Sandbox
New limit value -> 1000 (that means 1000 USD/month)
AWS Documentation for this step
Step 2
Open the SNS console
Open Mobile > Text Messaging (SMS)
Click Edit, on the Text messaging preferences panel
Set the Account spend limit, it must be any value betwee 1 and the limit you requested to AWS Support, in my case $1000.
In same view, scroll down and configure the Delivery status logging, create or select and existing Role.
AWS Documentation for this step
Conclusion
You need an AWS limit increase and also configure SNS correctly.