HOW-TO: SMS via Amazon Web Services

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

Final Thoughts

As I mentioned earlier, AWS SNS is a notification service, not an SMS messaging service. Once you have a topic set up, options for subscriptions are more or less wide open as long as the subscriptions stick to the list of protocols offered by SNS. Some, like email subscriptions, won't even require changes to the configuration outlined in this HOW-TO. The following JSON is an example of an email subscription that would have worked just fine with the topic we set up in the walk-through:

    {
        "protocol": "email",
        "topicArn": "arn:aws:sns:us-east-1:743696396783:newtopic",
        "endpoint": "username@domain.com"
    }
    

Assuming the topic also had the SMS subscription, the message we sent in the walk-through would have been received on the phone and also in the username@domain.com email account (in the case of email, the display name serves as the subject unless a different subject is configured when creating the message. I encourage you to check out the additional options for publish() that we did not go over because they do not apply to SMS).

One more thing. While AWS SNS is convenient (especially if you are using an EC2 instance), it is not necessarily the cheapest service. After exceeding the free tier offering, the price-per-SMS-message goes up to a level that is comparable to competitor services like Twilio's. Not that it's expensive, but you may find competitors' offerings more user-friendly than AWS'. Also, competitors may offer more options for analytics for the same price. However, at the free tier level, AWS SNS seems like one of the best options, possibly even the best.

Further Reading

The following resources were utilized to gain insight to AWS SNS, AWS SDK, and other bits and pieces that make up this HOW-TO:

A few examples of other people using AWS SNS for fun and profit:

To be fair, some competitors (in case you want to comparison shop):

Colophon

This HOW-TO website was built using Neovim, straight HTML5 and CSS3 (no tricks, no jQuery, not even any JavaScript), and PHP5 running on Apache 2. Testing was performed using Chromium and Firefox on Ubuntu GNOME (Linux, for the unwashed).

The fonts— Oswald and News Cycle —are provided by Google Fonts. It's amazing how well that service works, and it's completely free. Fonts are picky things and a trained eye will be able to tell the difference between a font like News Cycle and its classic inspiration News Gothic, but to non-designers there's no obvious difference. Kudos to Google for providing this service.