AWS Cloud Practitioner Study Notes · Part 63

Amazon Bedrock vs Amazon Lex: Which Conversational AI Service?

AWS Cloud Practitioner study notes comparing Amazon Bedrock and Lex for generative AI, intents, slots, workflows, tool use, chatbots, and voice apps.

Amazon Bedrock and Amazon Lex can both appear in a chatbot architecture, but they solve different problems. The fastest decision rule is:

Amazon Lex     → Guide a conversation to complete a defined task
Amazon Bedrock → Generate, reason over, retrieve, and orchestrate open-ended responses

This is Part 63 of the AWS Cloud Practitioner Study Notes. Choose Lex when the conversation should follow an intentionally designed flow. Choose Bedrock when the application needs foundation-model capabilities such as natural-language answers, summarisation, RAG, or flexible tool use.

The short comparison

FeatureAmazon BedrockAmazon Lex V2
Primary roleManaged generative AI and foundation-model platformManaged conversational interface with speech recognition and NLU
Conversation styleOpen-ended and model-generatedIntent-, slot-, and flow-oriented
Main configurationModel, prompts, knowledge bases, guardrails, tools, or agentsIntents, sample utterances, slots, prompts, and fulfillment
Best forAI assistants, RAG, summarisation, reasoning, content generationBooking, ordering, status checks, IVR, and predictable workflows
OutputGenerated text, structured response, or tool decisionDialog response and captured intent/slot values
Business actionsTool use or application integrationLambda or backend fulfillment
ControlMore flexible, requires more evaluation and guardrailsMore deterministic and explicit

The boundary is not absolute. Lex V2 includes advanced AI-assisted NLU features, and Bedrock can be constrained with structured prompts, tools, and validation. The services still have different centres of gravity.

Amazon Lex: the conversation workflow engine

Amazon Lex V2 builds voice and text conversational interfaces. You define the goals a user wants to accomplish as intents, the information required as slots, and the steps and responses that move the conversation towards fulfillment.

User: “I want to book a physiotherapy appointment.”

Lex recognises BookAppointment intent

Lex asks for required slots

Date → time → service → confirmation

Lambda or backend fulfills the booking

An intent represents a goal such as BookAppointment, CancelAppointment, CheckOrderStatus, or TransferMoney. Slots capture values such as a date, account number, amount, product, or location. A Lambda code hook can validate slot values and invoke business logic.

Lex is a strong fit when the application must:

  • Ask for required information in a known sequence
  • Validate values before fulfillment
  • Provide predictable prompts and responses
  • Connect a voice or text interface to backend operations
  • Support IVR or contact-centre interactions
  • Enforce an explicit workflow for regulated or high-risk actions

Lex is not simply a rigid keyword matcher. It uses natural-language understanding to map user utterances to configured intents and slot types, and it can dynamically manage the conversation. However, the application team still defines the intents, slots, fulfillment, and allowed flow.

Amazon Bedrock: the generative AI platform

Amazon Bedrock provides managed access to foundation models and capabilities for building generative AI applications. A Bedrock application can accept open-ended questions, retrieve information, generate content, create embeddings, and use configured tools or knowledge bases.

User question

Amazon Bedrock foundation model
      ├── Retrieve relevant knowledge
      ├── Generate an answer
      ├── Return structured output
      └── Request a tool or API call

Bedrock is a good fit for:

  • ChatGPT-like assistants
  • Customer-support assistants
  • Document summarisation
  • Blog or knowledge-base question answering
  • RAG applications
  • Code explanation and generation
  • Multi-step requests that combine information and actions

Bedrock does not make business logic disappear. Your backend should remain the source of truth for permissions, booking rules, prices, transactions, and data validation. The model may decide which tool is relevant, but the tool should enforce authentication, authorisation, input validation, idempotency, and transaction rules.

One task, two designs

Imagine a physiotherapy website.

Lex design

User says “Book an appointment”

BookAppointment intent

Lex collects date, time, and service slots

Lambda validates availability

Booking API creates appointment

This is predictable and easy to test as a workflow. The bot can ask exactly the questions required by the booking domain.

Bedrock design

User: “I have shoulder pain. Explain possible next steps,
      tell me the price, and book me next Saturday morning.”

Bedrock interprets the request
        ├── Retrieves approved educational content
        ├── Retrieves pricing information
        ├── Calls availability tool
        ├── Requests confirmation
        └── Calls booking API after authorisation

This provides a more natural experience, but requires substantially more engineering around retrieval grounding, tool permissions, confirmations, safety, output validation, and observability. For health-related or other high-stakes content, a generative response must not be treated as a diagnosis or a substitute for qualified professional care.

Intents and slots versus model reasoning

Lex uses explicit intent and slot concepts:

Intent: TransferMoney
Required slots:
  - SourceAccount
  - DestinationAccount
  - Amount
  - Confirmation

If a required slot is missing, Lex elicits it. If a value is invalid, the bot can retry or call a Lambda validation hook. This makes the conversation state visible and the allowed path clear.

Bedrock starts with a natural-language request and uses a foundation model to interpret it. You can constrain the response with system instructions, structured output schemas, retrieval, guardrails, and tools, but model output still needs validation.

Lex: explicit dialog state and required slots
Bedrock: model interpretation plus application-controlled tools

For financial transfers, account changes, or regulated forms, explicit workflow control can be more important than conversational flexibility. For knowledge questions and content generation, Bedrock’s flexibility is often the main benefit.

Tool use and backend APIs

Bedrock can integrate with tools and application APIs so that the model can request an action. AWS documentation describes Bedrock knowledge bases and agents as ways to retrieve enterprise information and orchestrate API actions; AWS has also introduced newer AgentCore capabilities as the product landscape evolves.

Regardless of the orchestration mechanism, use a clear boundary:

Bedrock decides or requests an action

Backend tool validates identity and input

Domain service applies business rules

Database or external system changes

Do not let an LLM write directly to a database just because it generated a plausible function call. A booking API should verify the authenticated user, availability, price, duplicate requests, and confirmation before committing the transaction.

Lex uses a similarly explicit integration boundary through Lambda fulfillment or another backend. Lex’s intent and slot state tells the backend what task the user is completing; the backend remains responsible for the actual operation.

Can they be used together?

Yes. A system might use Lex for voice or contact-centre flows and Bedrock for knowledge answers or summarisation. For example:

Voice call

Lex V2 captures intent and slots
      ├── Booking intent → Booking API
      ├── Account status → Account API
      └── Complex FAQ → Bedrock knowledge workflow

Another design might use Bedrock as the main assistant and route high-risk actions to a Lex-like explicit workflow or a backend confirmation step. The choice depends on the required control, channel, compliance, and user experience.

When to choose Lex

Choose Amazon Lex V2 when:

  • The user’s goal can be modelled as a finite set of intents.
  • Required fields and validation rules are known.
  • The workflow must be predictable and auditable.
  • Voice or IVR support is important.
  • The bot needs to gather slots and call Lambda fulfillment.
  • Unconstrained generated answers would create unacceptable risk.

Examples include appointment booking, order status, password-reset initiation, insurance claim intake, account balance lookup, and contact-centre routing.

When to choose Bedrock

Choose Amazon Bedrock when:

  • Users ask broad or unexpected questions.
  • The application needs summarisation, generation, classification, or semantic retrieval.
  • A knowledge base should ground natural-language answers.
  • A conversation may combine several information requests and tools.
  • You need to evaluate or switch between supported foundation models.
  • The product requires an AI assistant rather than a fixed dialog tree.

Examples include document assistants, internal knowledge search, support drafting, code assistants, RAG applications, and content generation.

How to choose safely

The right service is not only about how natural the conversation feels. Compare:

Decision factorLean towards LexLean towards Bedrock
Risk of an incorrect actionHigh control requiredManageable with strong tools and review
Conversation shapeKnown tasks and fieldsOpen-ended questions
Response requirementsPredictable wording and stateDynamic explanation or synthesis
Primary channelVoice, IVR, structured chatWeb, mobile, enterprise assistant
Data sourceBackend APIs and configured slotsDocuments, knowledge bases, tools, and APIs
TestingDialog-path and slot testsEvaluation sets, grounding, safety, and tool tests

For a mixed product, use a hybrid architecture. Let the model handle information and intent interpretation, but move sensitive operations into explicit backend tools with confirmation and audit logs.

Common exam questions

You need a chatbot that books an appointment by collecting date and time.

Use Amazon Lex V2 with intents, slots, and Lambda or backend fulfillment.

You need a ChatGPT-like application that answers broad questions.

Use Amazon Bedrock.

You need a voice or IVR bot with controlled steps.

Use Amazon Lex V2.

You need RAG over company documents.

Use Amazon Bedrock with a knowledge-base or retrieval architecture.

You need to call a booking API from an AI assistant.

Use Bedrock tool use or an agent-style integration, but keep authorisation and business rules in the backend.

Does Lex have any AI capability?

Yes. Lex V2 provides NLU and can include newer LLM-assisted features, but it remains centred on configured intents, slots, and conversation flows.

Does Bedrock replace backend APIs?

No. Bedrock can select or request tools, but backend services remain responsible for secure, authoritative business operations.

Final memory map

Amazon Lex V2
→ Intent
→ Collect slots
→ Validate
→ Fulfill through Lambda or backend
→ Predictable task completion

Amazon Bedrock
→ Foundation model
→ Retrieve knowledge
→ Generate or reason
→ Request tools
→ Flexible AI assistant

The one-sentence takeaway is: Amazon Lex is a managed intent-and-slot conversation workflow for predictable tasks, while Amazon Bedrock is a foundation-model platform for open-ended generative AI, retrieval, and controlled tool use.

Sources

Back to the journal