Sending SMS Notifications of JSCAPE MFT Server Events Via Amazon SNS
In a previous post, we outlined the steps of setting up JSCAPE MFT Server to publish messages to Amazon SNS. This setting us useful in cases when you want server admins to receive notifications regarding certain events on your managed file transfer server. Now, in that tutorial, the notifications were sent via email. But what if you want to send them through an SMS text message instead? You'll learn how to do that here.
There are two ways of sending SMS messages from JSCAPE MFT Server through Amazon SNS. The first option, which sends a message using the Amazon SNS Publish SMS Message trigger action, will suffice if you only need to send the message to one recipient. The second option, which sends a message using the Amazon SNS Publish Message action, is more suited for cases wherein you need to send the message to multiple recipients.
A lot of what's going to be discussed here have already been covered in the blog post entitled 'How To Publish Messages To Amazon SNS Using JSCAPE MFT Server' and in a video bearing the same title, so we suggest you either read that post or watch that video to get better context.
If you wish to watch a video version of THIS tutorial, play the video below. Otherwise, just proceed.
Prerequisites from AWS
Before you can start sending SMS messages from MFT Server, there are a couple of things you'll need to do on the Amazon AWS side. This would include the following:
- Obtain your security credentials like your Access Key ID (we call this Username / Access Key on MFT Server) and its corresponding Secret Key (a.k.a. password)
- Know the AWS region at which the SNS service is associated with
- Obtain the topic's ARN (Amazon Resource Name)
#3 is only needed in option 2. So, if you only need to send SMS messages to a single phone number, you won't need an ARN.
One important thing you'll need to bear in mind though is that Amazon SNS support for SMS messaging only applies to certain countries and AWS regions. If you want to know which regions and countries are supported, you can find an updated list on this page.
Once you got all that ready, the next thing to do is prepare an Amazon AWS trading partner on JSCAPE MFT Server. You'll need this trading partner regardless whether you go with option 1 or option 2.
Preparing the Amazon AWS trading partner
We've already outlined the steps for setting up an Amazon AWS trading partner in the blog post 'How To Publish Messages To Amazon SNS Using JSCAPE MFT Server', so we suggest you just go there and scroll down to the section entitled 'Creating an Amazon AWS trading partner'. Remember, when you select a region, make sure you pick one that supports SMS messaging.
Once you have your trading partner set up, you can then proceed to either option 1 or option 2. Note that, the main MFT Server object responsible for sending out SMS messages via Amazon SNS is a trigger action. Meaning, it's part of a trigger. So, you'll have to create a trigger, select a trigger event you'd like this trigger to respond to (e.g. a file upload, an account creation, a particular time, and so on), and specify some trigger conditions if needed, before you can configure the trigger action in question.
We assume you already know how to create a trigger. Otherwise, we strongly recommend you read that blog post we've been mentioning since the start of this article.
Option 1: Sending notifications to one phone number
Assuming you've already selected a trigger event and specified a trigger condition (or simply skipped that part), the next thing you need to do is add a trigger action and select the Amazon SNS Publish SMS Message trigger action. Click OK to proceed.
Once you're inside the Amazon SNS Publish SMS Message action parameters dialog, you need to specify pertinent details like the following:
Partner - This should be the trading partner you created earlier.
Message type - You can select between two types: Promotional and Transactional. Promotional messages are non-critical in nature, such as marketing-related messages. Transactional messages, on the other hand, usually contain confidential information like one-time passwords for multi-factor authentication and the like.
Phone Number - This is just the phone number of the recipient
Message - This is the message itself. Note that you can insert variables that contain properties related to the trigger event raised. To insert variables just use the Add Variable button and then select your desired variables from the drop down list.
Sender ID - This is an optional value that should contain up to 11 alphanumeric characters, including at least one letter and no spaces. This ID is displayed as the message sender on the receiving device.
Once you're done, click all OK buttons until you get back to the main screen.
Option 2: Sending notifications to multiple phone numbers
To send notifications to multiple phone numbers, you'll need the Amazon SNS Publish Message trigger action. Again, I'm going to assume you've already selected a trigger event and specified a trigger condition if you needed one.
Once you're inside the trigger action parameters dialog, configure the following settings:
Partner - Choose the trading partner you created earlier
Topic - From the drop-down list, select the AWS SNS topic to which you'd like to send the message
Subject - This is an optional parameter but is useful to the recipient of the message. It will give him or her an idea what the message is all about.
Message - This is the message itself. Note that you can insert variables that contain properties related to the trigger event raised. To insert variables just use the Add Variable button and then select your desired variables from the drop down list.
Message Format - You can choose between Raw and JSON formats. Just leave it as is for now.
Once you're done, click all OK buttons until you get back to the main screen.
That's it. Now you know how to configure JSCAPE MFT Server to send SMS messages via Amazon SNS.
Would you like to try this out yourself? Download the free, fully-functional Starter Edition of JSCAPE MFT Server now.
Download JSCAPE MFT Server Trial