Updated on July 11, 2025

A group of people holding colored circles connected to the AWS logo in the center. The image represents the interconnectedness of various services and solutions offered by Amazon Web Services (AWS).

Building a chatbot was a complex process, but that was years ago. With the advent of low-code no-code platforms, you can get up and running with building a bot without any need to know a programming language.

There are a lot of bot platforms out there that help you build a chatbot from scratch, and Amazon Lex is one such platform. Amazon Lex is a part of AWS and is gaining popularity among leading companies throughout the world in 2025.

Table of Content

  1. What is Amazon Lex?
  2. Understanding AWS Lex Bot
  3. Steps to Create Amazon Lex
  4. Integrating Amazon Lex bot into a website
  5. Integrate Amazon Lex using Kommunicate

What is Amazon Lex?

Amazon Lex is a service by AWS for building conversational interfaces into any application using voice and text. Amazon Lex has quickly become popular among chatbot enthusiasts and developers worldwide. Notably, popular Amazon products such as Alexa are powered by the same deep learning technology as Amazon Lex.

In this comprehensive Amazon Lex tutorial, I will help you understand the basic concepts of Lex and explain how to create a chatbot and integrate it into your website step by step.

Key Amazon Lex Features in 2025:

  • Natural Language Understanding (NLU): Advanced AI for understanding user intents
  • Automatic Speech Recognition (ASR): Convert speech to text with high accuracy
  • Multi-platform Integration: Works with Facebook, Slack, Twilio, and more
  • Scalable Architecture: Handles thousands of concurrent conversations
  • Cost-effective Pricing: Pay only for what you use
 A chatbot interface showing a conversation with a chatbot named Eve. The user has typed "Hello" and Eve has responded with "Hey Thanks for reaching out to Kommunicate! How can I assist you today?". There are buttons for "Create a chatbot," "Book a Demo," and "Talk to Human." The chat widget also includes a text input field for the user to type their message.

Bonus: Don’t know to code? Try our codeless bot builder.

Understanding AWS Lex Bot Architecture

To understand the Amazon Lex platform, let’s examine how a typical chatbot conversation works. Consider this interaction between a flight booking chatbot and a user:

User: Book me a flight to New York from Boston.
Bot: Sure! Which date do you want to fly?
User: I am planning to fly on March 15th.
Bot: Ok. Do you want me to book a return ticket as well?
User: Yes.
Bot: Please help me with the date of your return.
User: March 22nd.
Bot: Alright. Searching for flights for March 15th and returning on March 22nd. Here are the results.

Amazon Lex Core Components:

1. Intents: What the user wants to accomplish

2. Utterances: Different ways users might express an intent

3. Slots: Information needed to fulfill the intent

4. Fulfillment: The business logic to complete the user’s request

    In this Amazon Lex tutorial, we’ll build a movie ticket booking chatbot from scratch using an AWS account. This guide is designed for marketers and non-technical users with little programming knowledge.

    book a demo ai chatbots
    Create a Custom Chatbot For Your Business Without Sign up

    How to Create Amazon Lex Chatbot: 6 Simple Steps

    For building your first Amazon Lex chatbot, you will need:

    1. An AWS account (available for free)
    2. 10-15 minutes of your time
    3. Basic understanding of chatbot concepts

    Let’s dive into the step-by-step Amazon Lex chatbot creation process:

    Step 1: Log Into Your AWS Account and Navigate to Amazon Lex

    Once you log into your AWS account, navigate to the Amazon Lex service:

    1. Search for “Amazon Lex” in the top search bar

    2. Or select it from the Services menu under “Machine Learning”

    3. Click “Create bot” to begin building your Amazon Lex chatbot

      Pro Tip: Bookmark the Amazon Lex console for easy access during development.

      Step 2: Configure Bot Settings and Initial Details

      In this step, you’ll provide basic information about your Amazon Lex bot. We’ll create a movie ticket booking chatbot – a practical use case that demonstrates key Amazon Lex features.

      Bot Configuration:

      • Bot Name: “BookMovieTicket”
      • Description: “Advnace movie ticket booking reservation bot”
      • IAM Role: Let Amazon Lex create a new role
      • COPPA Compliance: Select based on your audience
      Amazon Lex Bot - Configure Bot Settings

      Language Settings:

      • Language: English (US)
      • Voice: Choose from available Amazon Polly voices
      • Session Timeout: 5 minutes (recommended for ticket booking)
      Amazon Lex Bot - Add language to Bot
      book a demo ai chatbots

      Step 3: Create Your First Intent

      The Intent is the core of your Amazon Lex chatbot. It defines what users want to accomplish.

      Intent Setup:

      1. Navigate to the Intents section

      2. Click “Create Intent”

      3. Name your intent “BookTicket”

      Amazon Lex Bot - Create Intent

      Intent Details Configuration:

      • Intent Name: BookMovieTicket
      • Description: “Initial intent to book a movie ticket”
      • Sample Utterances: Add various ways users might request tickets
      Amazon Lex Bot - Enter Intent Details

      Sample Utterances

      Next comes the “Sample utterances” section, where you can specify the probable questions that a customer might ask your bot.

      Sample Utterances to Add:

      • “Book movie tickets”
      • “I want to watch a movie”
      • “Reserve tickets for tonight”
      • “Book tickets”
      • “Show me available movies”
      • “I need movie tickets”
      Amazon Lex Bot - Add Sample Utterance

      Initial Response Setup

      Add a welcoming message: “Sure! I’d be happy to help you book movie tickets. Let me get some details from you.”

      Collecting User Information

      Next comes the fun part – personalization! This is the part where you collect a detail about the customer, something like a name or an email address.

      In this tutorial, I am collecting the name.

      Scroll down further on the screen, and give an initial response. Here, I have given “Sure, I can help you book a movie ticket,” as shown.

      Amazon Lex Bot - Add message to response

      We can then add a “Slot,” which is where Amazon Lex stores the username.

      We have to define a prompt here give a name to the Slot and specify a Slot type.

      The Slot name is “YourName,” and the Slot type is “AMAZON:FirstName.” There are a variety of Slot types which you can choose from, in the drop-down menu.

      Amazon Lex Bot - Add Username

      The final part of fetching the Username is to write down the confirmation message in the Confirmation section. 

      For this tutorial, I have written “Great to meet you, {YourName}, which is the Slot Name we specified.

      Remember to Save Changes to the intent as shown below.

      Amazon Lex Bot - Save prompt message

      Step 4: Adding Custom Slot Types for Movie Options

      We now have a small, basic working chatbot on Amazon Lex which greets you on your website and asks you your name (and remembers it too.).

      It is now time to add options to your chatbot.

      Now we’ll add movie-specific options to make our Amazon Lex chatbot more functional.

      For this tutorial, I am going to air the following movies at my cinema.

      1. Killers of the Flower Moon
      2. Indiana Jones and the Dial of Destiny
      3. Guardians of the Galaxy 3
      4. The Nun Part 2

      The show timings are 11 AM, 2 PM, 6 PM, and 9 PM, which I have to input into the bot.

      Once you have hit the “Save Intent” button, go back to the Intents List on the top left of the screen.

      Select the “Slot types” on the left of the screen and click on the “Add slot type” drop-down menu.

      Amazon Lex Bot - Add Slot type

      Give the name to your custom-built slot, which, in this case, is MovieName

      Amazon Lex Bot - Add Slot Type Name

      We now have to add values to this slot, which are the options that a user will have.

      Since there are only 4 movies that we will be airing, we will have to choose the “Restrict to Slot Values,” tab.  Amazon Lex also gives you the ability to give approximate names to the movie titles that the audience will be typing out. 

      For instance, for “Killers of the Flower Moon,” we have given approximations include “Killers of the,” “Flower moon,” etc.

      We have added 4 values for this tutorial, as seen below:

      Amazon Lex Bot- Save Slot Value

      Click on Save Slot Type and this step is complete!!

      book a  demo ai chatbots

      Step 5: Adding Multiple Slots to Your Intent

      Once you save your slot type, you will have to navigate back to the Intents section on the left-hand side.

      Click on the intent you want to add the slot to, which, in our case, is “BookTicket.”

      Scroll down to the Slots section, and click on Add Slot.

      Amazon Lex Bot- Add more Slots
      Amazon Lex Bot - Add Multipe Slot Step 2

      In the image above, you can see that we are giving the name of the slot as “MovieName” and the Slot type as the custom-built type “MovieName”, which is now visible on the panel.

      In the prompt below, you have to give the options to the customer, about the movies airing at the cinema. We have given all the 4 movies as shown.

      We have also followed the same step and added a Slot type called “MovieTimings.”

      Once you have added these slots, it is time to modify your confirmation message.

      We have made changes to the confirmation message as shown below, adding the Slot types {MovieName} and {MovieTimings}.

      Amazon Lex Bot - Prompt message confirmation

      Step 6: Build and Test Your Amazon Lex Chatbot

      It is now time to save your intent and build and test your bot. This is pretty simple on Amazon Lex.

      Just click on the “Build” button at the top, and, if there are no errors, the bot is built.

      It is now time to Test the bot.

      Click on the Test button, and you are ready to roll.

      You can see how our bot responds to even the prompt ‘Killers” in the below screenshot:

      Amazon Lex Bot- Build and Test chatbot

      There you have it.

      A chatbot built entirely on Amazon Lex. You can build bots entirely on Amazon Lex, or, to make things simpler, you can use a bot builder such as Kommunicate.

      Integrating Amazon Lex Chatbot into Your Website

      Lex has built-in support to integrate bots with some platforms such as Facebook, Kik, Slack, etc.  If you want to integrate your bot with your website or mobile apps, you have two ways:

      1. Using AWS SDK: AWS SDK provides APIs to send queries to the bot. This requires a lot of programming knowledge, development, and maintenance efforts.

      2. Using Kommunicate, which provides a codeless integration with Amazon Lex.

        Amazon Lex Integration Using Kommunicate

        Kommunicate is a bot+human hybrid customer support software that provides code-less integration with chatbot builder platforms such as Amazon Lex, Google Dialogflow, etc. Once integrated, your users can chat with your bot using a beautiful and customizable chat widget.

        Your Lex bot can be integrated into your website in a few simple steps:

        Here is the quick video.

        Step 1: Create Your Free Kommunicate Account

        You can create a free account in Kommunicate. Head to the signup section to start.

        Step 2: Connect Your Amazon Lex Chatbot

        Post signup, navigate to the bot integration section, and select the Amazon Lex platform. Kommunicate requires the below detail to query your bot on your behalf. 

        Integrating Kommunicate Bot from Amazon Lex Step 2

        You just need to fill in a few details to connect your Lex bot. You can get these details in your AWS Management Console -> Security credentials section.

        1. Access key ID & Secret access key: Access key ID and secret access key are required to sign requests sent to your Lex bot. To get your access key, sign into your AWS console as an IAM (Identity and Access Management) user having permission to access Lex API. Locate your user name in the upper-right section of the navigation bar. From the drop-down menu, select My Security Credentials. Then create an access key in the Access keys for CLI, SDK, & API access sections. You can find more details in this blog.

        2. Bot name in Lex platform: This is the same name you entered while creating the bot in the Lex platform. If you are not aware of it, you can also get it from the bot list on the Lex home page.

        3. Bot alias: A bot alias is a pointer to a specific bot version. The alias is exposed to client applications instead of the version.  If you publish a new version of the bot and want kommunicate to connect to the new version, you can simply point the alias to the new version from the Lex console without changing anything on Kommunicate Dashboard. 

        4. Region: AWS region where your Lex service is running. You can find your region in the top-right corner, following the user name in the AWS console.

        Once you have the above information follow the below steps, click Save and Proceed.

        Step 3: Configure Bot Identity and Personality

        You can give your bot a name and a profile picture. The name and the profile picture will be visible to your users while interacting with your bot. Give your bot a name. This name will be visible to your users who interact with your bot. Click Save and Proceed.

        A comprehensive guide on healthcare chatbots

        Step 4: Set Up Human Handoff

        Your bot is as smart as you can make it. But at times, it may fail to understand a user’s questions. In that case, you can trigger a chatbot to human handoff. This helps you make the overall user experience better and handle edge cases.

        Choose whether to enable or disable this feature and click on Finish bot integration setup.

        Step 5: Configure Conversation Assignment Rules

        To let your user chat with the new bot, you need to assign all the conversations to the bot. After finishing the bot setup, click on Let this bot handle all the incoming conversations. Now, all new conversations initiated after the integration will be assigned to this bot, and your bot will start answering them.

        You can also enable conversation assignments from the Conversation Rules section.

        Step 6: Install Chat Widget on Your Website

        The final step is installing the Kommunicate chat widget on your website so your website user can chat with your bot. Copy the installation script from the Install section and paste it into your website. Here are the detailed instructions to install the same.  This is how the chat widget looks on a website

        Install Kommunicate chat widget to website

        Publish your website, and your bot will be ready to chat with your users. Hurray! That was easy, isn’t it?

        Suggested Reads: Add Rich Message Button Response in Amazon Lex

        book a demo ai chatbots

        Amazon Lex Use Cases and Success Stories

        Here are a couple of organizations that have successfully implemented Lex into their business processes to yield significant results.

        TransUnion

        TransUnion is a worldwide information and insights enterprise that helps businesses transact with their customers using data such as credit scores, credit checks, and credit reports. 

        Before Amazon Lex, this was handled by TransUnion’s contact center, which was high in cost, and also inefficient. TransUnion customers’ time went into navigating the IVR system before they could talk to an agent. By implementing Amazon Lex which is a part of Amazon Connect, to automate the IVR. This change has significantly reduced customer wait times in the contact queue. The customer spends 18 seconds in the IVR as opposed to the previous 2 minutes, with a transfer rate cut by half. This has led to a 40% reduction in the annual costs of the contact center. 

        ROYBI Inc.

        ROYBI Inc. is an enterprise that has its objectives in changing early-childhood education for the better. They mix robotics with AI to make a fun, interactive learning experience that offers more benefits than traditional teaching methods. For businesses handling large datasets alongside conversational AI, it’s also important to move data from Amazon Redshift to S3 to optimize storage costs and enable advanced analytics through tools like Athena or Glue.

        This formative period in a child’s life is where they absorb the most information and build a foundation that will carry them through life.” AWS and ROYBI have built a customized platform using the computer vision product Amazon Rekognition to enable learning between children and ROYBI robots. This is where Amazon Lex is the conversational interface that comprehends and engages the child to deliver a better multi-modal learning experience.

        Enhance customer support with AI-driven email ticketing – automate workflows     and resolve queries faster with Kommunicate!

        Wrapping Up the Amazon Lex Tutorial

        Amazon Lex continues to be a powerful tool for building conversational interfaces in 2025. When combined with other AWS services and integration platforms like Kommunicate, it becomes an even more valuable asset for businesses looking to enhance customer experience.

        Key takeaways from this Amazon Lex tutorial:

        • Amazon Lex is accessible to non-technical users
        • The visual interface makes bot building straightforward
        • Integration options are flexible and scalable
        • Real-world success stories demonstrate clear ROI

        Whether you’re building a simple FAQ bot or a complex customer service assistant, Amazon Lex provides the foundation for creating engaging conversational experiences.

        Ready to get started? Create your free Kommunicate account today and integrate your Amazon Lex chatbot with your website in minutes.

        Suggested Reads: Integrate Dialogflow Chatbot in Your Website


        At Kommunicate, we envision a world-beating customer support solution to empower the new era of customer support. We would love to have you on board to have a first-hand experience of Kommunicate. You can signup here and start delighting your customers right away.

        Write A Comment

        You’ve unlocked 30 days for $0
        Kommunicate Offer

        Upcoming Webinar: Conversational AI in Fintech with Srinivas Reddy, Co-founder & CTO of TaxBuddy.

        X