title: Send sms via aws-sdk-js
body: <p>What is the way to send sms using aws-sdk-js ?
  <a href="https://github.com/aws/aws-sdk-js" rel="nofollow noreferrer">https://github.com/aws/aws-sdk-js</a>   </p>
  
  <p>Is there is proper code available from amazon for this(javascript).
  I refered the below docs, but is not enough informative
  <a href="https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/SMS.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/SMS.html</a></p>
  
  <p>This code actually worked for me.</p>
  
  <pre><code>const AWS = require('aws-sdk');
  AWS.config.update({
      region: 'ap-southwest-1',
      accessKeyId: 'XXXXXXXXXXXXXXXXXXXX',
      secretAccessKey: 'xxxxSSSSXXXXXXXXXXXXXXXXXXXXXXXXXX'
  });
  
  var sns = new AWS.SNS();
  
  var params = {
      Message: 'Alert! emssage.....',
      MessageStructure: 'string',
      PhoneNumber: 'XXXXXXXXXXXX'
  };
  
  sns.publish(params, function (err, data) {
      if (err) console.log(err, err.stack);
      else console.log(data);
  });
  </code></pre>
  
  <p>Any better way of doing this with adding Sender ID and all?</p>