Membership notification system using AWS Pinpoint SMS!
January 15th, 2024

The Challenge!

We had a voice notification system setup to alert member of our "club" about meetings and special events.  It consisted of a Dynamodb table that listed the phone numbers of the club membership; several lambda functions to access and update the database and an Amazon Connect instance to drive the telephone network requirements.   It worked well and got the job done.   Administrators would call up the application, enter a security authorization code, reset the database, record a new greeting and have a message delivered to every member within minutes.  The only complaint was having to maintain the membership database.  Members came and went and someone had to keep the database updated!

The Solution

Text had an interesting advantage!  Members would be able to add or delete themselves from the database themselves.  You would add yourself to the notification list by texting the work JOIN to the published notification number.  If you wanted to leave the list, simply send the word STOP to the same number and you would be removed.     This seem like a perfect solution, creating a self healing application that  would free if not eliminate the need for administrators.

AWS Pinpoint SMS to the rescue

Some of the components we used in the voice notification system were still required.  The dynamodb table and lambda were still critical components.  We did not need to use Amazon Connect for the telephone interface as AWS Pinpoint had an SMS interface.  We also needed to add SNS so that an incoming SMS message would trigger the lambda function to parse the message.     Pinpoint at the time we implemented the first version of the product did not have a facility for testing the application.   SMS spam has become such an issue, that you are now required to register your "campaign" and have the carrier approve it before you can send your fist text message.  There is now a newer version of Pinpoint SMS that has a test facility, but you are still required to obtain approval for your planned usage of the SMS functionality by carrier.   The process is frustrating and may take more than 30 days to complete, so be forewarned!

Bells and Whistle Options

Members would send the word JOIN to be added to the notification list, but who could send messages to the list?  The goal was to eliminate dependence on an administrator to send SMS messages that might originate from different parts of the organization.   To accomplish this, we created a SEND option!  We defined an environmental parameter that was the "secret password" and if this word was the first word in the incoming text message, Lambda would strip it off and forward the rest of that incoming message to the membership list.  (How kool is that)?   In our next version, we added the ability to customize the JOIN message to include firstName and lastName.