Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting success response from AWS SNS but SMS not delivered

I am writing a simple program to send SMS using SNS service using the Javascript client.

var AWS = require('aws-sdk');
var sns = new AWS.SNS({
  region : 'ap-southeast-1',
  accessKeyId: '',
  secretAccessKey: ''
});
sns.publish({
      Message : "Test message",
      PhoneNumber : "Test number"
    }, function (err, data) {
        if(err) {
          console.log("Error - " + err);

        }
        else {
          console.log('Success - ');
          console.log(data);

        }

    });

I get a success and the data looks like

{ ResponseMetadata: { RequestId: '3b4e8c82-976c-55da-b1fa-dcd9ddc7254d' },
  MessageId: '47a38cbe-2047-5056-a615-dce56aecc0c1' }

However, the SMS does not get delivered.

What could be the problem?

like image 384
S V Avatar asked Sep 20 '16 14:09

S V


People also ask

Does AWS SNS guaranteed delivery?

Q: Does Amazon SNS guarantee that messages are delivered to the subscribed endpoint? Yes, as long as the subscribed endpoint is accessible. A message delivery fails when Amazon SNS can't access a subscribed endpoint, due to either a client-side or a server-side error.

Can SNS lose messages?

If you use the same deduplication ID or if you have content deduplication switched on then you won't be able to deliver the same message within a 5 minute period. SNS/SQS have such epic durability that it would be almost impossible to randomly lose messages unless you're processing billions per hour.

Can AWS SNS receive messages?

You can use Amazon Simple Notification Service (Amazon SNS) to send and receive Short Message Service (SMS) notifications to SMS-enabled mobile phones and smart phones. SMS notifications are currently supported for phone numbers in the United States. SMS messages can be sent only from topics created in the US East (N.


1 Answers

The messages started getting delivered after 24th for fresh requests. The metrics dashboard is showing the data a day stale. On the dashboard It correctly showed that all the SMS deliveries had failed on 21st September, inspite of a positive response from API. This is making me reconsider my decision of using SNS for SMS.

Thanks all who helped.

like image 176
S V Avatar answered Oct 07 '22 22:10

S V