Scroll Top

Building hybrid conversational mobile apps using AWS Lex

Getting your Trinity Audio player ready...

Since the inception of digital machines (Computers and it’s sister devices), we were accustomed to communicating with them (to and from)  in a certain way i.e. like using keyboard and mouse. In last decade, mobiles brought in revolutionary changes in terms of usability which lead to wider acceptance across the globe. Now more people are linked to digital machines. However, mobile did not change the mode of communication but made the communication simple within its own context.

Since few years, our scientific community and engineers started exploring alternative ways to communicate with Digital machines. One of the prominent ways is through Voice i.e. devices can take instructions from us, then act and respond to instruction. This can become a conversation as if human beings are talking to each other,  which can lead to the desired output. AWS Lex is one of the prominent cloud-based services which enables developers to build conversational apps for digital and mobile devices.

AWS Lex provides native plugins to allow users to build conversational mobile apps. However, AWS did not provide hybrid (Cordova) plugins. As you know hybrid mobile apps are taking center stage these days, having cordova plugin will definitely help the developer’s community. Hence we built a cordova plugin for Android and IOS which allow us to build hybrid conversational mobile apps.

In this blog, we have covered the steps on how to build conversational mobile apps using the hybrid plugin and we are going to configure AWS Lex voice bot with existing schedule appointment blueprint.


Steps to configure AWS Lex service and generation of Cordova plugin:

  • Configure the AWS Lex service from amazon console by using the following link here. Now you will have the bot ready to be integrated into any app.
  • Install ionic cli and cordova by using the following command for generating hybrid mobile app.

          npm install -g ionic cordova

  • Create ionic project by using the following command. This command allows you to generate tab structure for default hybrid app

          ionic start < project name> tabs

  • Add the platforms to the app by using the following commands.

          ionic cordova platform add android

          ionic cordova platform add ios

  • Add the cordova plugin by using the following command

          ionic cordova plugin add  <path to plugin folder>

  • In mobile app business flow, add an event which will trigger conversation and call the implemented plugin method to bootstrap AWS Lex voice interaction on button click. Now we can verify the flow configured in AWS Lex service.

Here you can find the demo video of sample ionic app with AWS Lex cordova plugin.


Nowadays customer experience becoming specific to users, It’s better to have a communication channel in your enterprise application. AWS Lex is the most powerful conversational interface to build interactive applications.

I hope this article was informative and leaves you with a better understanding of building Cordova plugin for AWS Lex service.

At Walking Tree, we are excited about the possibilities that AWS related Cordova plugins bring in. Stay tuned for more articles on this topic.  

Related Posts

Comments (3)

Source code for cordova plugin is missing.

Very impressive work. I am especially interested in the techniques you used to record voice sampling data. Did you use cordova plugin for voice recording and playback? Could you please share us your sourcecode or explain in a bit more details? thanks a lot.

Narendra Bandhamneni

Hi Licheng Zeng, we have developed cordova wrapper on top of aws lex service. We have used cordova and aws lex service for this plugin development.

Leave a comment

Privacy Preferences
When you visit our website, it may store information through your browser from specific services, usually in form of cookies. Here you can change your privacy preferences. Please note that blocking some types of cookies may impact your experience on our website and the services we offer.