Solutions Infini SMS gateway integration using Node.js, AWS lambda & API Gateway

AWS lambda

AWS Lambda runs your code on a high-availability compute infrastructure and performs all of the compute resource management including the operating system and server maintenance, automatic scaling and code monitoring, capacity provisioning, etc., which makes it ideal for sending messages.

Node.js Support

The AWS SDK for Node.js enables developers to build libraries and applications that use AWS services. You can use the JavaScript API in the browser and inside Node.js applications on the server.

API Gateway

Amazon API Gateway manages all the tasks involved in accepting and processing up to hundreds of thousands of concurrent API calls, including authorization and access control, traffic management,  monitoring, and API version management.


Sending an SMS based on the request parameters through API call.


  • AWS lambda function
  • API Gateway
  • Node.js


API Gateway

The following Steps are required for implementing the above flow chart:

Step 1: Create a Lambda function using the below code.

var globalTunnel = require('global-tunnel');

var aws = require("aws-sdk");

var solutionInfiApiUrl = “” + <APIKey>;

var request = require('request');

//initializing Json request

              var Json = {};

              Json.sender = <Sender Number>;

              Json.message = <Message>;

              Json.format = 'json';

              Json.flash = 0;

              Json.sms = [];

              var receiver = {}

     =<receiver Number>;


                var body = JSON.stringify(Json);                     

              // making POST request to send SMS


                       url:  solutionInfiApiUrl,

                       body:   body

                  }, function(error, response){

                 if (error) {

                     result.message = 'Send SMS faild'

                       result.error = error ;




                   result.message = 'SMS sent Successfully to ' + phoneMumber;

                   console.log('response' +  JSON.stringify(response));




Step 2: Create an API Gateway and add mapping of above lambda function.

Step 3: Test the API through Postman (Chrome App) by passing the below request parameters.

Request Format Type:  JSON 

      Method:  POST.


 "PhoneNumber": "<ReceiverMobileNumber>",

 "ProjectName": "<ProjectName>",

 "PropertyName": "<PropertyName>"



Using solutions inifini, we can create multiple Dynamic templates as well as a static template. Hence, we can send both dynamic and static SMS through AWS for the given phone number.


About Uday Kiran

Uday Kiran is an Senior software engineer at Vmoksha Technologies. He is passionate about exploring new automation technologies for cloud,mobile and web application . He loves reading novels, traveling, and trekking. He has done Master's at Andhra University.

3 comments on “Solutions Infini SMS gateway integration using Node.js, AWS lambda & API Gateway

  1. Adrita Sharma

    Same error. Do you have the solution?

  2. Divya

    I am getting {
    “status”: “E612″,
    “message”: “Invalid Template Match”
    } as response on simple get url call with all parameter

    1. Mohsin

      Whats more surprising is that several services got the same E612 Invalid Template Match message at the same time, so there’s a parent company that originally made this documentation and APIs and no clue who did it first. Same error faced by Solutions Infini, variforrmsolution and sakthisolutions.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>