We are currently revamping our website to improve user experience. During this time, some pages or links may not function as expected. We regret any inconvenience and appreciate your patience and continued support.

Amazon Lex Guide: Building Chatbots and Voice Bots on AWS

Amazon Lex builds chatbots and voice bots on AWS. Learn how intents work, its generative AI features, pricing and best practices.

What Is Amazon Lex?

Most organizations face the same demand: customers want instant answers, employees want self-service tools and callers want to fix problems without waiting on hold. Building chatbots, voice assistants and IVR systems used to take deep expertise in natural language processing, speech recognition and dialog management. Amazon Lex, however, removes most of that work with a fully managed conversational AI service.

Amazon Lex is a fully managed AWS service for building conversational interfaces with voice and text. It uses the same kind of automatic speech recognition (ASR) and natural language understanding (NLU) technology behind Amazon Alexa, so developers can build chatbots and voice assistants without machine learning expertise. You define the conversation, and Lex handles speech recognition, intent classification, slot filling and dialog management.

Recently, Amazon Lex has changed a lot with generative AI. The current version, Amazon Lex V2, integrates directly with Amazon Bedrock, so bots can use large language models for more natural, flexible conversations. Features such as Assisted NLU, the QnA intent with Bedrock Knowledge Bases and natural language bot building let Lex bots handle open-ended questions, resolve ambiguous requests and give more human-like answers, which older intent-only chatbots could not do.

Lex at a Glance

2
Interaction Models: Request-Response and Streaming
10K text
Free Tier Requests (Monthly)
5x
Cost of a Speech Request vs a Text Request

Amazon Lex also works with the wider AWS ecosystem: Amazon Connect for cloud contact centers, Lambda for fulfillment logic, Polly for spoken responses, Comprehend for sentiment analysis and Bedrock for generative AI. As a result, you can build a complete conversational AI solution inside AWS, from voice recognition and dialog management to backend fulfillment and analytics.

In addition, Lex bots can run on several channels. Web and mobile apps connect through the AWS SDKs, Facebook Messenger, Slack and Twilio SMS have built-in integrations, and Amazon Connect covers phone and chat. Other channels, such as Microsoft Teams or WhatsApp, need a custom integration or a Connect channel. Either way, one bot definition serves every channel with the same intents and fulfillment logic.

In practice, enterprises across industries use Amazon Lex. Banks and insurers automate routine account questions, healthcare providers run appointment scheduling bots that pass urgent cases to staff, and contact centers replace touch-tone menus with natural language IVR. So Lex handles simple FAQ bots as well as complex, multi-turn transactional conversations.

Amazon Lex checklist: 10,000 free text requests a month, speech requests about 5x the cost of text, and five best practices for production bots
Five practices for successful Amazon Lex bots.

Key Takeaway Amazon Lex brings Alexa-style conversational AI to your applications, with voice and text across several channels and generative AI features through Amazon Bedrock. If your organization needs chatbots, voice assistants or IVR systems that understand natural language, Lex is a quick route to production-grade conversational interfaces on AWS.


How Amazon Lex Works

Amazon Lex uses an intent-based conversation model with generative AI support. You define what the bot should do (intents), what information it needs (slots) and how it responds (prompts and fulfillment). Lex then handles language understanding, speech recognition, dialog state and multi-turn conversation, so developers can focus on business logic instead of NLP infrastructure.

Core Conversation Architecture

Every Amazon Lex bot is built on three concepts:

  • Intents: Actions the user wants to take, such as “BookHotel”, “CheckBalance”, “ResetPassword” or “ScheduleAppointment”. In other words, each intent is a distinct user goal. You provide sample utterances, meaning example phrases a user might say, and Lex’s NLU engine learns to match new input to the right intent.
  • Slots: The details the bot must collect to fulfill an intent. For a hotel booking, slots might be check-in date, check-out date, city and room type. Lex asks for each required slot, validates the answer and asks again when a value is missing or invalid.
  • Fulfillment: The action taken once all required slots are filled. Usually, fulfillment calls an AWS Lambda function that reaches backend APIs, queries databases, processes transactions or calls third-party services.

So a conversation runs like this: the user says something, Lex classifies the intent, Lex asks for the required slots, the user answers, Lex runs the fulfillment logic and the bot replies with the result. Lex manages these multi-turn dialogs itself: you define the slots and prompts, and Lex orchestrates the conversation.

Two Interaction Models

Amazon Lex V2 supports two interaction models:

  • Request-response: Each user input, voice or text, is a separate API call. The bot then receives the input, processes it and returns a response. This model suits text chatbots and applications with discrete, asynchronous interactions.
  • Streaming conversation: All user inputs across several turns flow through a single streaming API call. The bot keeps listening and can respond proactively, for example sending “Take your time” when the user pauses. This model is built for voice-first applications, IVR systems and real-time phone conversations through Amazon Connect.

Pricing differs between the two: request-response charges per message, while streaming charges per 15-second interval of active session time. So the right model depends on your channel (text or voice) and interaction pattern (discrete or continuous).

Generative AI Integration in Lex

Since 2024, Amazon Lex V2 has integrated directly with Amazon Bedrock, which adds generative AI features that widen what bots can handle:

  • Assisted NLU: Uses large language models to improve intent classification and slot resolution, while staying within your configured intents and slots. You get better understanding of requests with less training data, because the model fills gaps in your sample utterances.
  • QnA intent with Bedrock Knowledge Bases: A built-in intent that searches a connected Bedrock Knowledge Base, built from your documents, FAQs and articles, and generates answers with a foundation model. Your bot can then answer open-ended questions it was never explicitly programmed for, as long as the answer is in the knowledge base.
  • AMAZON.BedrockAgentIntent: Connects your Lex bot to Bedrock Agents for multi-step, agentic tasks, so users can start complex workflows through conversation.
  • Natural language bot building: Developers describe the task in plain English, for example “organize a hotel booking including guest details and payment method”, and Lex generates the intents, slots, prompts and dialog flow.

When Lex’s classic NLU cannot match input to any intent, a generative AI fallback can ask a Bedrock foundation model for a relevant reply instead of returning a generic “I didn’t understand”. As a result, that reduces abandoned conversations and improves satisfaction.

Together, structured intents and generative AI form a useful hybrid. Intent-based handling gives predictable, controlled responses for business-critical transactions such as bookings, payments and account changes, while generative AI covers the long tail of open questions, clarifications and edge cases that would be impractical to program one by one.

Guardrails and Safety for Lex GenAI

You can also apply Bedrock Guardrails to the generative AI responses in Lex, so model answers follow your content safety policies and brand guidelines. Guardrails reduce the risk of inappropriate or ungrounded answers, which matters for customer-facing bots in regulated industries such as healthcare and financial services. The hybrid design gives enterprises the reliability they need and users the flexibility they expect.


Core Amazon Lex Features

Beyond the conversation architecture and generative AI features, Amazon Lex includes several tools for enterprise deployments:

Visual Conversation Builder
A drag-and-drop editor for designing conversation flows without code. Non-technical team members can map intents, slots, prompts, conditional branches and fulfillment visually.
Automated Chatbot Designer
Upload existing contact center transcripts, and Lex analyzes them to propose a first bot design, including intents, slot types and sample utterances drawn from real customer conversations.
Test Workbench
Create and run test sets to measure bot performance as you add use cases. Lex can also generate audio and text test cases from earlier interactions and reports on transcription accuracy, intent matching and slot resolution.
Analytics Dashboard
Built-in dashboards show conversation volumes, intent recognition, slot resolution, fallback rates and completion rates, so you can monitor performance and find what to improve.
Multi-Channel Deployment
Deploy one bot definition to web and mobile apps, Facebook Messenger, Slack, Twilio SMS and Amazon Connect. As a result, every channel uses the same conversation logic and NLU.
Global Resiliency
Global Resiliency replicates your bot to a second AWS Region for better availability and disaster recovery, so conversational interfaces stay reachable during a regional outage.

Advanced Lex Abilities

Amazon Lex also has features for more complex conversations:

  • Context management: Lex tracks context across multi-turn conversations. As prerequisite intents are completed, you can set “contexts” that activate related intents, which simplifies complex dialog trees without custom code.
  • Conditional branching: Define branches in a conversation based on slot values, session attributes or external conditions. The conversation then adapts to user input and business rules.
  • Custom vocabulary: Add domain words, proper nouns and technical terms to improve speech recognition. Custom vocabulary is also available in many languages, which helps localized customer-facing bots.
  • Network of bots: Combine several Lex bots to handle multi-domain conversations. Users move between specialized bots, such as billing, technical support and scheduling, while the conversation context is kept.
  • Bot templates: Pre-built templates with conversation flows, training data and prompts for common industry scenarios. They shorten the time to a first deployment.

Talk to an ExpertPlanning a chatbot or voice IVR? Design your Amazon Lex bot with us.


Amazon Lex Pricing Model

Fundamentally, Amazon Lex uses pay-per-request pricing with no upfront commitments or minimum fees. Rather than listing specific dollar amounts that change over time, here is how the cost structure works across the two interaction models:

Understanding Lex Cost Dimensions

  • Text requests (request-response): Each text input counts as one text request. This is the cheapest interaction type and suits web and mobile chatbots where text is the main input.
  • Speech requests (request-response): Each voice input counts as one speech request. Speech requests cost about 5x more than text requests, because the audio must go through ASR before NLU.
  • Streaming text: Billed per 15-second interval of an active streaming session, for continuous text conversations where the bot keeps a connection open.
  • Streaming speech: Billed per 15-second interval of an active streaming speech session. This is the most expensive type and is used for voice-first IVR and phone conversations through Amazon Connect.

Training and Free Tier for Lex

  • Automated Chatbot Designer: Billed per minute of training time while it analyzes transcripts to produce a bot design. You pay once per design iteration.
  • Free tier: 10,000 text requests and 5,000 speech requests a month for the first 12 months, which covers development, testing and low-volume production bots.
Cost Optimization Strategy

Move users to text channels, such as web chat and messaging, where you can, because text costs roughly 5x less per interaction. For voice IVR, design conversations with fewer turns, since each turn is a separate request in request-response mode. Use streaming only when the bot really needs to keep listening. And cache common responses to cut Lambda and Polly calls. For current prices, see the official Lex pricing page.

Watch for Hidden Costs

Amazon Lex pricing covers only conversation processing. In production, the total also includes Lambda charges for fulfillment, Amazon Polly if the bot speaks, Amazon Connect for phone interactions, Bedrock for generative AI features such as the QnA intent and Assisted NLU, and CloudWatch for logging and monitoring. So track every connected service in AWS Cost Explorer to avoid billing surprises.


Amazon Lex Security and Compliance

Lex bots often handle sensitive customer data, such as account numbers, personal details, health questions and financial transactions, so security matters in every production deployment.

Data sent to and from Amazon Lex is encrypted in transit with TLS and at rest with AWS KMS. In addition, IAM policies control which users and applications can create, change and invoke bots, and CloudTrail logs every Lex API call for compliance and security reviews. AWS may use content processed by Lex to improve the service, unless you opt out.

Amazon Lex is covered by AWS compliance programs such as SOC, PCI DSS and ISO 27001, and it is HIPAA eligible, so bots can process protected health information when they are designed with the right access controls, encryption and audit logging across the conversation pipeline. Government teams should check AWS Services in Scope and the GovCloud service list for current coverage.

You can opt out of content use for service improvement through AWS Organizations AI services opt-out policies, and you can request deletion of voice and text inputs tied to your account, which supports data retention policies and privacy laws such as GDPR. Lex processes data in the AWS Region you choose; if you use Bedrock features, also check where those models run.


What’s New in Amazon Lex

Amazon Lex V2 has received major updates over the past two years, with generative AI the biggest change:

Late 2023
Generative AI Features Launch
Amazon Lex added generative AI features, including natural language bot building, the QnA intent with Bedrock Knowledge Bases and model-powered fallback handling. As a result, bots could now handle much more than their pre-programmed intents.
2024
Assisted NLU and Bedrock Agent Integration
Assisted NLU uses large language models to improve intent classification with less training data. AMAZON.BedrockAgentIntent connects Lex bots to Bedrock Agents for multi-step tasks through conversation.
Early 2025
Enhanced QnA with Guardrails
The QnA intent gained support for Bedrock Guardrails, which adds content safety filters to generative AI responses, along with support for newer foundation models.
2025-2026
Global Resiliency and Language Expansion
Global Resiliency replicates bots across AWS Regions for availability. Custom vocabulary support also expanded to more languages.

So the gap between intent-based chatbots and generative AI assistants has narrowed. Modern Lex bots combine the predictability of intent-based dialog with the flexibility of model-powered answers in one service.

With Assisted NLU reducing the training data needed for accurate classification, the QnA intent removing the need to pre-program every question and Global Resiliency improving availability, Lex V2 in 2026 is very different from the intent-only bot builder it started as. Teams that tried Lex earlier and found it too rigid should take another look, because the generative AI features address many of those limits. Lex V1, meanwhile, reached end of support in September 2025.


Real-World Amazon Lex Use Cases

Because it handles voice and text, Amazon Lex powers conversational AI in most industries, from financial services and healthcare to retail, technology and government.

Most Common Lex Implementations

Below are the use cases we implement most often for enterprise clients:

Contact Center IVR Automation
Replace rigid touch-tone IVR menus with natural language voice interfaces through Amazon Connect. Customers describe the issue in their own words, and Lex routes them to the right resolution, which takes load off human agents.
Customer Support Chatbots
Automate routine customer questions, such as balance checks, order tracking, password resets and FAQs, across web, mobile and messaging channels. As a result, customers get answers at any hour, with shorter waits.
E-Commerce Shopping Assistants
Build conversational shopping experiences that help customers find products, check availability, compare options and buy through natural language. You can also add Bedrock Knowledge Bases for product catalog questions.
Healthcare Appointment Scheduling
Build scheduling bots for healthcare providers that check availability, book appointments, send reminders, handle cancellations and assess urgency on incoming calls, sending emergencies straight to staff.
IT Helpdesk Automation
Create internal support bots for password resets, software installation help, IT ticket creation and tracking, and VPN troubleshooting. Here, Lambda fulfillment functions connect to ServiceNow, Jira and other ITSM platforms to query tickets and trigger automated fixes.
HR and Employee Self-Service
Build HR assistant bots that answer policy questions, support benefits enrollment, process time-off requests and guide new employees through onboarding. Again, Lambda functions connect to Workday, BambooHR and other HR systems for real-time data and transactions.

Amazon Lex vs Azure Bot Service

If you are comparing conversational AI platforms across cloud providers, here is how Amazon Lex compares with Microsoft’s Azure Bot Service and Azure AI Language:

Ability Amazon Lex Azure Bot Service
NLU Technology ✓ Alexa-grade ASR + NLU with GenAI Yes: CLU in Azure AI Language (LUIS retired 2025)
Generative AI Integration ✓ Bedrock Knowledge Bases, Assisted NLU Yes: Azure OpenAI integration
Visual Bot Builder Yes: Visual Conversation Builder Yes: Bot Framework Composer
Automated Bot Design ✓ From conversation transcripts ◐ No direct equivalent
Contact Center Integration ✓ Native Amazon Connect integration Yes: Dynamics 365 Contact Center
Channel Support Yes: Web, mobile, Slack, Messenger, SMS, phone ✓ Broader channel support via Bot Framework
Multi-Region Replication ✓ Built-in Global Resiliency ◐ Requires manual multi-region setup
Analytics Dashboard Yes: Built-in Lex Analytics Yes: Application Insights integration
Free Tier Yes: 10K text + 5K speech/month Yes: Standard channels free
GovCloud Support ✓ AWS GovCloud (US-West) Yes: Azure Government

Choosing the Right Lex Alternative

Both platforms offer mature conversational AI, so your cloud ecosystem usually decides. On AWS, especially with Amazon Connect as your contact center, Lex gives the simplest development and deployment path. If your organization runs on Azure and Dynamics 365, Azure Bot Service fits more naturally with the Microsoft stack.

Lex’s Automated Chatbot Designer, which builds bot designs from existing transcripts, is a strong differentiator for organizations with contact center data. Azure’s Bot Framework, for its part, offers broad channel support and a mature SDK for complex multi-bot designs. And Azure connects to Azure OpenAI models, while Lex connects to the models available in Bedrock, such as Claude, Llama, Mistral and Amazon Nova.

Beyond the major cloud providers, platforms such as Voiceflow offer no-code builders with more design freedom, while Dialogflow on Google Cloud provides strong multilingual NLU with deep Google integration. Amazon Lex’s strength lies in combining Alexa-style speech recognition, native Connect integration, transcript-based bot design and Bedrock generative AI in one AWS service.

For organizations already on Amazon Connect, Lex integrates natively without middleware or third-party connectors. The Connect, Lex, Lambda and Bedrock stack gives an end-to-end conversational AI pipeline in one cloud, which simplifies architecture, reduces cross-service latency, keeps billing in one AWS account and allows unified monitoring in CloudWatch.


Getting Started with Amazon Lex

Amazon Lex needs no ML expertise to start. You can build and test a working bot in the console within minutes, using the Visual Conversation Builder or a natural language description. The free tier gives 10,000 text requests and 5,000 speech requests a month for the first 12 months, which covers development, testing and low-volume production without upfront commitment.

Building Your First Lex Bot

Open the Amazon Lex V2 console and create a new bot. You can start from a blank bot or from a template for scenarios such as hotel booking, food ordering or customer support. Define your first intent with a descriptive name, add sample utterances, configure required slots with prompts and connect a Lambda function for fulfillment. Then test in the console’s chat window to check the conversation flow before deploying to production channels.

Here is a minimal Python example that sends a text message to an existing Lex bot and reads the response:

import boto3

# Initialize the Lex V2 Runtime client
client = boto3.client('lexv2-runtime', region_name='us-east-1')

# Send a text message to the bot
response = client.recognize_text(
    botId='YOUR_BOT_ID',
    botAliasId='YOUR_ALIAS_ID',
    localeId='en_US',
    sessionId='user-session-001',
    text='I want to book a hotel in Seattle for next weekend'
)

# Print the bot's response
for message in response['messages']:
    print(f"Bot: {message['content']}")

For voice bots, use the recognize_utterance API to send audio, or integrate with Amazon Connect for phone conversations. To add generative AI, configure a QnA intent connected to a Bedrock Knowledge Base. For more details and patterns, see the Amazon Lex V2 documentation.

Accelerating Bot Development

If you have contact center data, the Automated Chatbot Designer can speed up development a lot. Upload transcripts from your best agents, and Lex proposes a first bot design with intents, slot types, sample utterances and prompts drawn from real conversations. So your bot handles the questions customers actually ask, instead of only the scenarios imagined during design.

For teams without coding experience, the Visual Conversation Builder offers a drag-and-drop interface for complex dialog flows. Product managers, customer experience designers and contact center supervisors can contribute to bot design, test flows visually and iterate without waiting for developers, which speeds up prototyping.


Amazon Lex Best Practices and Pitfalls

Advantages
Alexa-style ASR and NLU with generative AI fallbacks
Bedrock integration for QnA, Assisted NLU, and agent workflows
Automated Chatbot Designer builds bots from real conversation data
Multi-channel deployment: web, mobile, Messenger, Slack, SMS, phone
Visual Conversation Builder for no-code bot design
Native Amazon Connect integration for contact center IVR
Limitations
Speech requests cost about 5x more than text requests
Streaming voice sessions can accumulate costs faster than expected
Generative AI features add Bedrock charges on top of Lex pricing
V1 reached end of support; V1 bots had to be rebuilt in V2
Complex fulfillment logic requires Lambda development expertise
Tightly coupled to AWS, with limited portability to other clouds

Recommendations for Lex Deployment

  • Start with high-volume, simple intents: Find the customer questions that come up most and are easiest to automate, such as balance checks, order status, password resets and FAQs. Automating these first gives the fastest return and frees agents for complex issues.
  • Use the Automated Chatbot Designer with real data: Upload transcripts from your best contact center agents. As a result, the design reflects how customers really talk, which improves intent recognition from day one.
  • Add the QnA intent with Bedrock Knowledge Bases: Connect your documentation, FAQs and knowledge articles to a Bedrock Knowledge Base and use the QnA intent as a fallback. Your bot can then handle questions outside its programmed intents instead of replying “I didn’t understand”.
  • Monitor costs across all connected services: Lex per-request pricing is only part of the bill, since Lambda, Polly, Bedrock, Connect and CloudWatch all add to it. So use AWS Cost Explorer with resource tags to see the full cost of the solution.
  • Run the Test Workbench before every update: Run automated test sets before deploying bot changes. Lex builds test cases from earlier interactions, so you can check that new intents or slot changes do not break existing flows.

Measuring Lex Bot Performance

Successful Lex deployments usually track four metrics in the built-in Analytics Dashboard:

  • Intent recognition rate: The share of user inputs matched to the right intent. If it falls over time, add training utterances or make your intents more distinct.
  • Slot resolution accuracy: The share of slots filled correctly from user input. Usually, low accuracy points to ambiguous prompts, weak slot validation or missing slot synonyms.
  • Containment rate: The share of conversations the bot resolves without handing over to a human agent. Then track it weekly to see how well automation is working.
  • Fallback rate: The share of user inputs that hit the fallback intent. A high rate signals gaps in intent coverage, either missing intents or too few training utterances for existing ones.

Key Takeaway Amazon Lex combines Alexa-style speech recognition, intent-based dialog and generative AI through Bedrock for multi-channel conversational AI. Successful deployments start with high-volume, simple intents, design bots from real conversation data, add generative AI fallbacks for coverage gaps and monitor every connected AWS service. An experienced AWS partner can help you design conversational architectures that raise containment while keeping conversations natural.

Our ServiceData Analytics, Business Intelligence and Artificial Intelligence


Frequently Asked Questions About Amazon Lex

Common Questions Answered
What is Amazon Lex used for?
Amazon Lex is used to build conversational interfaces, meaning chatbots and voice assistants that understand natural language. Common uses include contact center IVR automation through Amazon Connect, customer support chatbots, shopping assistants, healthcare appointment scheduling, IT helpdesk automation and HR self-service. Lex handles voice and text across web, mobile, messaging and phone channels.
Is Amazon Lex free?
Yes. The free tier gives 10,000 text requests and 5,000 speech requests a month for the first 12 months, which covers development, testing and low-volume production bots. After that, Lex charges per request with no minimum fees. Production bots usually add costs from Lambda, Polly, Connect, Bedrock and other connected services.
What is the difference between Amazon Lex and Amazon Bedrock?
Amazon Bedrock gives API access to foundation models for building custom AI applications; it is a general-purpose generative AI platform. Amazon Lex is built for conversational interfaces, with dialog management, slot filling, multi-turn orchestration and multi-channel deployment. Lex also uses Bedrock for QnA answers, assisted intent classification and agent workflows. So think of Bedrock as the AI engine and Lex as the conversation layer that adds structured dialog, channel integrations and analytics.

Technical and Architecture Questions

Should I use Amazon Lex V1 or V2?
Use Amazon Lex V2. Lex V1 reached end of support in September 2025, and V2 includes all the generative AI features, the Visual Conversation Builder, analytics, the Test Workbench and Global Resiliency. V1 bots could not be upgraded in place and had to be recreated with the V2 APIs, using AWS’s migration guide.

Integration and Channel Questions

Can Amazon Lex handle voice and text simultaneously?
Yes. One Lex bot handles voice and text with the same intents, slots and fulfillment logic, whether the user types in web chat or speaks on a phone. Voice input goes through Lex’s built-in ASR, including 8 kHz telephony audio for phone calls, and is then processed by the same NLU as text. Responses can be returned as text for chat or as speech through Amazon Polly for voice channels, so the experience stays consistent.
How does Amazon Lex integrate with Amazon Connect?
Amazon Connect integrates natively with Amazon Lex through contact flows. When a customer calls your Connect contact center, the flow sends the call to a Lex bot for natural language IVR. The customer describes the issue in plain language instead of pressing buttons, and Lex classifies the intent, collects the needed details through multi-turn dialog and validates them against business rules. Lex then resolves the issue through Lambda fulfillment or routes the caller to the right agent, with the conversation context and collected data attached.

References

  1. Intents, Slots, Streaming, QnA Intent, Bedrock Integration: AWS — Amazon Lex V2 Developer Guide
  2. Request and Streaming Pricing, Free Tier: AWS — Amazon Lex Pricing
  3. Lex V1 End of Support and Migration to V2: AWS — Migrating a Bot from Lex V1 to V2
Newsletter

Security Insights, Delivered.

Practical, vendor-neutral analysis of threats, tools, and architecture decisions.

Book a Consultation

A practice principal will contact you within 1 business day.

Thank you! A Signisys principal will be in touch within 1 business day.