Answers: <p>I believe you will need to do this programmatically using the AWS SDK as described in <a href="http://docs.aws.amazon.com/sns/latest/dg/sms_publish-to-phone.html#sms_publish_sdk" rel="nofollow noreferrer">Sending a Message (AWS SDKs)</a>. Here is a quote a from it:</p>
  
  <blockquote>
    <p>To send an SMS message by using one of AWS SDKs, use the action in
    that SDK that corresponds to the Publish request in the Amazon SNS
    API. With this request, you can send an SMS message directly to a
    phone number</p>
    
    <p>...</p>
    
    <p><strong>Sending a Message (AWS SDK for Java)</strong></p>
    
    <p>The following example uses the publish method of the AmazonSNSClient
    class to send a message directly to a phone number:</p>
  
  <pre><code>public static void main(String[] args) {
          AmazonSNSClient snsClient = new AmazonSNSClient();
          String message = "My SMS message";
          String phoneNumber = "+1XXX5550100";
          Map&lt;String, MessageAttributeValue&gt; smsAttributes = 
                  new HashMap&lt;String, MessageAttributeValue&gt;();
          //&lt;set SMS attributes&gt;
          sendSMSMessage(snsClient, message, phoneNumber, smsAttributes);
  }
  
  public static void sendSMSMessage(AmazonSNSClient snsClient, String message, 
        String phoneNumber, Map&lt;String, MessageAttributeValue&gt; smsAttributes) {
          PublishResult result = snsClient.publish(new PublishRequest()
                          .withMessage(message)
                          .withPhoneNumber(phoneNumber)
                          .withMessageAttributes(smsAttributes));
          System.out.println(result); // Prints the message ID.
  </code></pre>
  </blockquote>
  
Answers: CC BY-SA 3.0
Answers: 2017-07-31T10:04:40.637Z
Answers: It does not make much sense if i need to write a code just to integrate with a an SMSC type of thing, the application code should be agnostic to the SMS service/SMS gateway/SMSC used to send SMS. I do not want to ship the delivery of the code with coded integrations for AWA- SNS.
Answers: lakshayk
Answers: CC BY-SA 3.0
Answers: 2017-08-02T15:12:51.670Z
Answers: If you don't want to ship code that connects to a specific provider, then you need to write an abstraction layer and ship that separately - there's no way everyone is going to agree on a common API.
Answers: Xiong Chiamiov
Answers: CC BY-SA 3.0
Answers: 2017-07-31T08:18:56.290Z
Answers: 2018-01-09T12:59:40.623Z
Answers: 2018-01-09T12:59:40.623Z
Answers: Mark Wragg
Body: <p>Can we send SMS through AWS for the below case?</p>
  
  <p>I have an application installed on Ec2 and that application runs few rules and may send SMS to end users if the rule conditions are met.</p>
  
  <p>I wanted to integrate it with some SMSC and thought of giving a shot with AWS-SNS. However, I am not able to figure out how will i integrate my application with AWS-SNS.</p>
  
  <p>Going through the documentation of AWS-SNS I am not sure if this can be achieved. It talks about creating topics and assigning E164 numbers to topics but does not tell us how to integrate this with our already existing application.</p>
  
Comments: CC BY-SA 4.0
Comments: 2018-06-17T03:38:37.493Z
Comments: While SNS can work for this... you might find a particularly focused SMS service like Twilio easier to work with, particularly if you're sending messages to lots of different numbers.
Comments: Tim Malone
Tags: <amazon-web-services><amazon-cloudwatch>
Title: How to send SMS through AWS?
UserDisplayName: lakshayk
ThreadText: # How to send SMS through AWS?
  
  (Asked by: username_0 on 2017-07-31)
  
  Can we send SMS through AWS for the below case?
  
  I have an application installed on Ec2 and that application runs few rules and may send SMS to end users if the rule conditions are met.
  
  I wanted to integrate it with some SMSC and thought of giving a shot with AWS-SNS. However, I am not able to figure out how will i integrate my application with AWS-SNS.
  
  Going through the documentation of AWS-SNS I am not sure if this can be achieved. It talks about creating topics and assigning E164 numbers to topics but does not tell us how to integrate this with our already existing application.
  
  **Tags:** amazon-web-services, amazon-cloudwatch
  
  > **Comments:**
  > **username_1**: While SNS can work for this... you might find a particularly focused SMS service like Twilio easier to work with, particularly if you're sending messages to lots of different numbers.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2017-07-31. Score: 8
  
  I believe you will need to do this programmatically using the AWS SDK as described in [Sending a Message (AWS SDKs)](http://docs.aws.amazon.com/sns/latest/dg/sms_publish-to-phone.html#sms_publish_sdk). Here is a quote a from it:
  
  > To send an SMS message by using one of AWS SDKs, use the action in
  > that SDK that corresponds to the Publish request in the Amazon SNS
  > API. With this request, you can send an SMS message directly to a
  > phone number
  >
  > ...
  >
  > **Sending a Message (AWS SDK for Java)**
  >
  > The following example uses the publish method of the AmazonSNSClient
  > class to send a message directly to a phone number:
  >
  > ```
  > public static void main(String[] args) {
  >         AmazonSNSClient snsClient = new AmazonSNSClient();
  >         String message = "My SMS message";
  >         String phoneNumber = "+1XXX5550100";
  >         Map<String, MessageAttributeValue> smsAttributes = 
  >                 new HashMap<String, MessageAttributeValue>();
  >         //<set SMS attributes>
  >         sendSMSMessage(snsClient, message, phoneNumber, smsAttributes);
  > }
  >
  > public static void sendSMSMessage(AmazonSNSClient snsClient, String message, 
  >       String phoneNumber, Map<String, MessageAttributeValue> smsAttributes) {
  >         PublishResult result = snsClient.publish(new PublishRequest()
  >                         .withMessage(message)
  >                         .withPhoneNumber(phoneNumber)
  >                         .withMessageAttributes(smsAttributes));
  >         System.out.println(result); // Prints the message ID.
  >
  > ```
  
  > **Comments:**
  > **username_0**: It does not make much sense if i need to write a code just to integrate with a an SMSC type of thing, the application code should be agnostic to the SMS service/SMS gateway/SMSC used to send SMS. I do not want to ship the delivery of the code with coded integrations for AWA- SNS.  
  > **username_3**: If you don't want to ship code that connects to a specific provider, then you need to write an abstraction layer and ship that separately - there's no way everyone is going to agree on a common API.  
  
  ---
  
  