AWS LEX - Developing a Simple Chat Bot

What are Chat Bots?

  • Chat Bot is a service that runs on rules or Artificial intelligence
  • The users interact using natural and conversational Language.
  • Chat Bots are like your personal assistants that actually assist you.
  • They can live in any chat applications like Slack, Facebook messenger, Skype etc.
  • Common example: Weather Bots - fetches forecast, current weather etc.
Top 5 tools to develop Chat Bot:
  1. Lex (Amazon Web Services)
  2. (Google)
  3. Azure Bot Service (Microsoft)
  4. (Facebook)
  5. Watson (IBM)
Building a Chat Bot using Amazon Web Services:

What is AWS Lex?

Lex is AWS service for building conversational interfaces for any applications using voice and text.
Lex enables you to build sophisticated, natural language Chat Bots into your new and existing applications. Lex can serve a variety of use cases, customer support, transaction fulfillment, data retrieval, or even DevOps functions (ChatOps).

AWS Lambda : Lex is integrated with AWS Lambda, a service that lets you run code without provisioning or managing servers. Lambda can be used as a Code Hook and also can be used to connect with other AWS services like SES, SNS, S3.

Simple Architecture:

Prerequisites of Building a chat bot on AWS platform:
  • AWS account
  • Knowledge of any one of the languages (Node JS, Python, Java)
  • Basic knowledge of Artificial Intelligence

Simple Chat Bot - Chat Bot to get details of any State in India

Step 1: Go to Lex in AWS management console and click on Create 

Step 2: Choose the "Custom Bot" and fill details like Bot name, Language, Output Voice.

Step 3: Customize your Bot using Lex Console

Lex Console has following things by which a Chat Bot can be built:
  1. Adding Utterances: Requests from users is called utterances. Example: I want to Order some flowers or Get my state details.
  2. Create an Intent: An action that the user wants to perform, with the minimum information needed. Intent Name should be Unique. Example: OrderFlowers or GetMyStateDetails
  3. Create Slot Types: Slot Types are basically parameter values which are used in the Intent. Lex provides both Custom and Built In slot types. Example: AMAZON.DATE for Date format, or custom slot for CAR TYPES with Enumerations
  4. Confirmation Prompt: It confirms with a final prompt whether the user want to proceed with the action or not. It accepts 'Yes' or 'NO' as input from User. Terminates the fulfillment if user replies 'No'.
  5. Fulfillment: Fulfillment can be done in two ways: Either invoke a Lambda function or return the parameters back.
Invoking the lambda function: Firstly we have to Create a Lambda function in Node JS. In this case we will invoke a Lambda function which takes user input and sends it to a REST API in Lambda function and returns the data back to Lex.

Lambda function for our Example here:

Build and test your Bot:

Here it is, your Bot is Ready!


  1. Thanks For sharing a nice article. Augurs Technologies also providing Best Chatbot Development Services in India, USA, UK.

  2. This blog gives a lot of Information, It's Useful, Thanks for the Information
    AWS Online Training Hyderabad

  3. You made some decent factors there. I looked on the internet for the difficulty and found most individuals will associate with along with your website.
    Chatbot Company in India
    Chatbot Company in Chennai
    Chatbot Development Company in Chennai
    Chatbot in Chennai

  4. Thanks for sharing Information to us. If someone wants to know about,I think this is the right place for you!

    Android App Development in Coimbatore
    Chatbot Development Company
    3D Animation Company

  5. I always like and such a super contents of these post, Good info I gained more information about that. Thanks for such a helpful information. Keep it up.
    Chatbot Developers in Dubai
    Facebook Chatbot in Dubai
    AI Chatbot in Dubai
    Artificial intelligence Company in Dubai

  6. Your information was very clear. Thank you for sharing.
    DevOps Online Training

  7. They’re really convincing and will definitely work. Still, the posts are too brief for newbies. May you please extend them a little from subsequent time?Also, I’ve shared your website in my social networks.
    Chatbot Company in Dubai
    Chatbot Companies in Dubai
    Chatbot Development
    AI Chatbot Development
    Chatbot Companies in UAE
    Chatbot Company in Chennai
    Chatbot Company in Mumbai
    Chatbot Company in Delhi
    Chatbot Development Companies

  8. We are ChatBot Company in INdia powered by Claritaz, which is an answer-database enabled chatbot that helps in resolving customer-queries in a conversational fashion, incorporating keyword-based and semantic search.

  9. This comment has been removed by the author.

  10. Great Content. It will useful for knowledge seekers. Keep sharing your knowledge through this kind of article.
    Mean Stack Training in Chennai
    Go Lang Training in Chennai
    Mean Stack Course in Chennai


Post a Comment

Popular posts from this blog


Understanding Spring MVC project setup