HOW-TO: SMS via Amazon Web Services

(To be followed in order, as indicated below...)

So, You Want to Send SMS Text Messages from Apps...

Really, who doesn't want to send SMS texts from apps? It's how people communicate nowadays. People send tens if not hundreds of little message snippets back and forth with friends, family, and co-workers daily—often at inopportune moments— most likely because its interrupt-driven nature demands attention in ways phone calls and emails do not. It's the short-attention-span, short-form messaging of choice, and best we can tell, it's rapidly supplanting telephones as the primary means of day-to-day communication.

So, yeah, text messaging, otherwise known in the tech industry as SMS messaging (SMS = "Short Message Service"). Many believe SMS requires a telephone and phone service. To some extent, yes, that is the case. Companies like Apple offer SMS messaging on Apple devices without needing phone service (iPod Touch, for example, can send/receive SMS messages to/from other users with Apple accounts via WiFi Internet), but most people that utilize SMS messaging do so through a telephone service.

Handheld electronics like phones and iPods aren't the only devices that can benefit from SMS. For example, you can purchase tiny devices that accept a cellular phone service SIM card and use them to get your "Internet of Things" devices on a cellular network where they can send and receive SMS messages.

This is all well and good, but is SMS-capable hardware really necessary if you want to participate in SMS messaging?

No, actually, it isn't. All you really need for sending SMS messages is Internet access and an account with an SMS provider. This HOW-TO will run through the steps of getting lined up with one of the biggiest fish in the cloud SMS pond: Amazon Web Services' (AWS) Simple Notification Service (SNS). By the end of this HOW-TO, you will be armed with all the information you need to get your own SMS service set up, accepting subscriptions, and sending messages.

Note A note before I go on: AWS is a huge, many-tentacled beast and is literally impossible to document in one small HOW-TO. Two services in particular will be addressed here: Elastic Compute Cloud (EC2) and the fore-mentioned SNS. Each service is offered by with hundreds of pages of documentation and API references. This HOW-TO will only go over the information that is needed for a basic SMS setup. Readers are encouraged to explore these and other AWS offerings not covered in detail in this HOW-TO. It's all fun stuff, I promise, but I won't cover it here.

Before we proceed...

We're almost ready to roll, but before that happens I need to lay out what I expect you to bring to the table:

  1. You are familiar with JavaScript. Not jQuery, JavaScript. There's a difference.
  2. You are familiar with what JSON is.
  3. You know what a REST API is even if you have not written one yet.
  4. You understand that web server requests accept "verbs" like GET and POST (the two that web browser forms can send. Others exist).
  5. You know what Node.js is even if you have not used it yet.
  6. When I say "cloud," you have some idea of what I'm talking about.
  7. You have some method by which you can send URLs to a REST API and see the responses. It could be the Postman extension to Chrome, or the curl command line utility, or...something.
  8. You are at least semi-comfortable at a command prompt.
  9. You know how to use at least one UNIX text editor.
  10. Understand that if you didn't instantly respond to the last item with "I know vim," you may need to install your editor.
  11. You are willing to read, experiment, and learn.

That said, let's get to it.