

End of support notice: On September 15, 2025, AWS will discontinue support for Amazon Lex V1. After September 15, 2025, you will no longer be able to access the Amazon Lex V1 console or Amazon Lex V1 resources. If you are using Amazon Lex V2, refer to the [Amazon Lex V2 guide](https://docs.aws.amazon.com/lexv2/latest/dg/what-is.html) instead. . 

# Deploying Amazon Lex Bots
Deploying Bots

This section provides examples of deploying Amazon Lex bots on various messaging platforms and in mobile applications.

**Topics**
+ [

# Deploying an Amazon Lex Bot on a Messaging Platform
](example1.md)
+ [

# Deploying an Amazon Lex Bot in Mobile Applications
](example2.md)

# Deploying an Amazon Lex Bot on a Messaging Platform


This section explains how to deploy Amazon Lex bots on the Facebook, Slack, and Twilio messaging platforms. 

**Note**  
When storing your Facebook, Slack, or Twilio configurations, Amazon Lex uses AWS Key Management Service customer managed keys to encrypt the information. The first time that you create a channel to one of these messaging platforms, Amazon Lex creates a default customer managed key (`aws/lex`). Alternatively, you can create your own customer managed key with AWS KMS. This gives you more flexibility, including the ability to create, rotate, and disable keys. You can also define access controls and audit the encryption keys used to protect your data. For more information, see the [AWS Key Management Service Developer Guide](http://docs.aws.amazon.com/kms/latest/developerguide/).

When a messaging platform sends a request to Amazon Lex it includes platform-specific information as a request attribute to your Lambda function. Use these attributes to customize the way that your bot behaves. For more information, see [Setting Request Attributes](context-mgmt-request-attribs.md).

All of the attributes take the namespace, `x-amz-lex:`, as the prefix . For example, the `user-id` attribute is called `x-amz-lex:user-id`. There are common attributes that are sent by all messaging platforms in addition to attributes that are specific to a particular platform. The following tables list the request attributes that messaging platforms send to your bot's Lambda function.


**Common Request Attributes**  

| Attribute | Description | 
| --- | --- | 
| channel-id | The channel endpoint identifier from Amazon Lex. | 
| channel-name | The channel name from Amazon Lex. | 
| channel-type |  One of the following values: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/lex/latest/dg/example1.html)  | 
| webhook-endpoint-url | The Amazon Lex endpoint for the channel. | 


**Facebook Request Attributes**  

| Attribute | Description | 
| --- | --- | 
| user-id | The Facebook identifier of the sender. See [https://developers.facebook.com/docs/messenger-platform/webhook-reference/message-received](https://developers.facebook.com/docs/messenger-platform/webhook-reference/message-received). | 
| facebook-page-id | The Facebook page identifier of the recipient. See [https://developers.facebook.com/docs/messenger-platform/webhook-reference/message-received](https://developers.facebook.com/docs/messenger-platform/webhook-reference/message-received). | 


**Kik Request Attributes**  

| Attribute | Description | 
| --- | --- | 
| kik-chat-id | The identifier for the conversation that your bot is involved in. For more information, see [https://dev.kik.com/\$1/docs/messaging\$1message-formats](https://dev.kik.com/#/docs/messaging#message-formats). | 
| kik-chat-type | The type of conversation that the message originated from. For more information, see [https://dev.kik.com/\$1/docs/messaging\$1message-formats](https://dev.kik.com/#/docs/messaging#message-formats). | 
| kik-message-id | A UUID the identifies the message. For more information, see [https://dev.kik.com/\$1/docs/messaging\$1message-formats](https://dev.kik.com/#/docs/messaging#message-formats). | 
| kik-message-type | The type of message. For more information, see [https://dev.kik.com/\$1/docs/messaging\$1message-types](https://dev.kik.com/#/docs/messaging#message-types). | 


**Twilio Request Attributes**  

| Attribute | Description | 
| --- | --- | 
| user-id | The sender's phone number ("From"). See [https://www.twilio.com/docs/api/rest/message](https://www.twilio.com/docs/api/rest/message). | 
| twilio-target-phone-number | The phone number of the recipient ("To"). See [https://www.twilio.com/docs/api/rest/message](https://www.twilio.com/docs/api/rest/message). | 


**Slack Request Attributes**  

| Attribute | Description | 
| --- | --- | 
| user-id | The Slack user identifier. See [https://api.slack.com/types/user](https://api.slack.com/types/user). | 
| slack-team-id | The identifier of the team that sent the message. See [https://api.slack.com/methods/team.info](https://api.slack.com/methods/team.info). | 
| slack-bot-token | The developer token that gives the bot access to the Slack APIs. See [https://api.slack.com/docs/token-types](https://api.slack.com/docs/token-types). | 

# Integrating an Amazon Lex Bot with Facebook Messenger
Integrating with Facebook

This exercise shows how to integrate Facebook Messenger with your Amazon Lex bot. You perform the following steps:

1. Create an Amazon Lex bot

1. Create a Facebook application

1. Integrate Facebook Messenger with your Amazon Lex bot

1. Validate the integration

**Topics**
+ [

## Step 1: Create an Amazon Lex Bot
](#fb-bot-assoc-create-bot)
+ [

## Step 2: Create a Facebook Application
](#fb-bot-assoc-create-fb-app)
+ [

## Step 3: Integrate Facebook Messenger with the Amazon Lex Bot
](#fb-bot-assoc-create-assoc)
+ [

## Step 4: Test the Integration
](#fb-bot-test)

## Step 1: Create an Amazon Lex Bot


If you don't already have an Amazon Lex bot, create and deploy one. In this topic, we assume that you are using the bot that you created in Getting Started Exercise 1. However, you can use any of the example bots provided in this guide. For Getting Started Exercise 1, see [Exercise 1: Create an Amazon Lex Bot Using a Blueprint (Console)](gs-bp.md).

1. Create an Amazon Lex bot. For instructions, see [Exercise 1: Create an Amazon Lex Bot Using a Blueprint (Console)](gs-bp.md). 

1. Deploy the bot and create an alias. For instructions, see [Exercise 3: Publish a Version and Create an Alias](gettingstarted-ex3.md).

## Step 2: Create a Facebook Application


On the Facebook developer portal, create a Facebook application and a Facebook page. For instructions, see [Quick Start](https://developers.facebook.com/docs/messenger-platform/guides/quick-start) in the Facebook Messenger platform documentation. Write down the following:
+ The **App Secret** for the Facebook App 
+ The **Page Access Token** for the Facebook page

## Step 3: Integrate Facebook Messenger with the Amazon Lex Bot


In this section, you integrate Facebook Messenger with your Amazon Lex bot.

After you complete this step, the console provides a callback URL. Write down this URL.

**To integrate Facebook Messenger with your bot**

1. 

   1. Sign in to the AWS Management Console and open the Amazon Lex console at [https://console.aws.amazon.com/lex/](https://console.aws.amazon.com/lex/).

   1. Choose your Amazon Lex bot. 

   1. Choose **Channels**.

   1. Choose **Facebook** under **Chatbots**. The console displays the Facebook integration page.

   1. On the Facebook integration page, do the following:
      + Type the following name: `BotFacebookAssociation`.
      + For **KMS key**, choose **aws/lex** .
      + For **Alias**, choose the bot alias.
      + For **Verify token**, type a token. This can be any string you choose (for example, `ExampleToken`). You use this token later in the Facebook developer portal when you set up the webhook.
      + For **Page access token**, type the token that you obtained from Facebook in Step 2.
      + For **App secret key**, type the key that you obtained from Facebook in Step 2.  
![\[Form for integrating your bot with facebook.\]](http://docs.aws.amazon.com/lex/latest/dg/images/fb-10a.png)

   1. Choose **Activate**. 

      The console creates the bot channel association and returns a callback URL. Write down this URL.

1. On the Facebook developer portal, choose your app.

1.  Choose the **Messenger** product, and choose **Setup webhooks** in the **Webhooks** section of the page.

   For instructions, see [Quick Start](https://developers.facebook.com/docs/messenger-platform/guides/quick-start) in the Facebook Messenger platform documentation. 

1. On the **webhook** page of the subscription wizard, do the following:
   + For **Callback URL**, type the callback URL provided in the Amazon Lex console earlier in the procedure.
   + For **Verify Token**, type the same token that you used in Amazon Lex.
   + Choose **Subscription Fields** (**messages**, **messaging\$1postbacks**, and **messaging\$1optins**).
   + Choose **Verify and Save**. This initiates a handshake between Facebook and Amazon Lex.

1. Enable Webhooks integration. Choose the page that you created, and then choose **subscribe**.
**Note**  
If you update or recreate a webhook, unsubscribe and then resubscribe to the page.

## Step 4: Test the Integration


You can now start a conversation from Facebook Messenger with your Amazon Lex bot. 

1. Open your Facebook page, and choose **Message**. 

1. In the Messenger window, use the same test utterances provided in [Step 1: Create an Amazon Lex Bot (Console)](gs-bp-create-bot.md).

# Integrating an Amazon Lex Bot with Kik
Integrating with Kik

This exercise provides instructions for integrating an Amazon Lex bot with the Kik messaging application. You perform the following steps:

1. Create an Amazon Lex bot.

1. Create a Kik bot using the Kik app and website. 

1. Integrate the your Amazon Lex bot with the Kik bot using the Amazon Lex console.

1. Engage in a conversation with your Amazon Lex bot using Kik to test the association between your Amazon Lex bot and Kik.

**Topics**
+ [

# Step 1: Create an Amazon Lex Bot
](kik-bot-assoc-create-bot.md)
+ [

# Step 2: Create a Kik Bot
](kik-bot-assoc-create-kik-bot.md)
+ [

# Step 3: Integrate the Kik Bot with the Amazon Lex Bot
](kik-bot-assoc-create-assoc.md)
+ [

# Step 4: Test the Integration
](kik-bot-assoc-test.md)

# Step 1: Create an Amazon Lex Bot


If you don't already have an Amazon Lex bot, create and deploy one. In this topic, we assume that you are using the bot that you created in Getting Started Exercise 1. However, you can use any of the example bots provided in this guide. For Getting Started Exercise 1, see [Exercise 1: Create an Amazon Lex Bot Using a Blueprint (Console)](gs-bp.md)

1. Create an Amazon Lex bot. For instructions, see [Exercise 1: Create an Amazon Lex Bot Using a Blueprint (Console)](gs-bp.md). 

1. Deploy the bot and create an alias. For instructions, see [Exercise 3: Publish a Version and Create an Alias](gettingstarted-ex3.md).

**Next Step**  
[Step 2: Create a Kik Bot](kik-bot-assoc-create-kik-bot.md)

# Step 2: Create a Kik Bot


In this step you use the Kik user interface to create a Kik bot. You use information generated while creating the bot to connect it to your Amazon Lex bot.

1. If you haven't already, download and install the Kik app and sign up for a Kik account. If you have an account, log in.

1. Open the Kik website at [https://dev.kik.com/](https://dev.kik.com). Leave the browser window open.

1. In the Kik app, choose the gear icon to open settings, and then choose **Your Kik Code**.

1. Scan the Kik code on the Kik website to open the Botsworth chatbot. Choose **Yes** to open the Bot Dashboard.

1. In the Kik app, choose **Create a Bot**. Follow the prompts to create your Kik bot.

1. Once the bot is created, choose **Configuration** in your browser. Make sure that your new bot is selected.

1. Note the bot name and the API key for the next section.

**Next Step**  
[Step 3: Integrate the Kik Bot with the Amazon Lex Bot](kik-bot-assoc-create-assoc.md)

# Step 3: Integrate the Kik Bot with the Amazon Lex Bot


Now that you have created an Amazon Lex bot and a Kik bot, you are ready to create an channel association between them in Amazon Lex. When the association is activated, Amazon Lex automatically sets up a callback URL with Kik.

1. Sign in to the AWS Management Console, and open the Amazon Lex console at [https://console.aws.amazon.com/lex/](https://console.aws.amazon.com/lex/). 

1. Choose the Amazon Lex bot that you created in Step 1.

1. Choose the **Channels** tab.

1. In the **Channels** section, choose **Kik**. 

1. On the Kik page, provide the following:
   + Type a name. For example, `BotKikIntegration`.
   + Type a description.
   + Choose "aws/lex" from the **KMS key** drop-down.
   + For **Alias**, choose an alias from the drop-down.
   + For **Kik bot user name**, type the name that you gave the bot on Kik.
   + For **Kik API key**, type the API key that was assigned to the bot on Kik.
   + For **User greeting**, type the greeting that you would like your bot to send the first time that a user chats with it.
   + For **Error message**, enter an error message that is shown to the user when part of the conversation is not understood.
   + For **Group chat behavior**, choose one of the options:
     + **Enable** – Enables the entire chat group to interact with your bot in a single conversation.
     + **Disable** – Restricts the conversation to one user in the chat group.

      
   + Choose **Activate** to create the association and link it to the Kik bot.  
![\[The Kik configuration screen.\]](http://docs.aws.amazon.com/lex/latest/dg/images/kik-10.png)

**Next Step**  
[Step 4: Test the Integration](kik-bot-assoc-test.md)

# Step 4: Test the Integration


Now that you have created an association between your Amazon Lex bot and Kik, you can use the Kik app to test the association.

1. Start the Kik app and log in. Select the bot that you created.

1. You can test the bot with the following:  
![\[1. "I would like to pick up flowers; 2. roses; 3. tomorrow; 4. 6:00 p.m.; 5. yes.\]](http://docs.aws.amazon.com/lex/latest/dg/images/kik-20.png)

   As you enter each phrase, your Amazon Lex bot will respond through Kik with the prompt that you created for each slot.

# Integrating an Amazon Lex Bot with Slack
Integrating with Slack

This exercise provides instructions for integrating an Amazon Lex bot with the Slack messaging application. You perform the following steps:

1. Create an Amazon Lex bot.

1. Create a Slack messaging application. 

1. Integrate the Slack application with your bot Amazon Lex.

1. Test the integration by engaging in conversation with your Amazon Lex bot. You send messages with the Slack application and test in a browser window.

**Topics**
+ [

# Step 1: Create an Amazon Lex Bot
](slack-bot-assoc-create-bot.md)
+ [

# Step 2: Sign Up for Slack and Create a Slack Team
](slack-bot-assoc-create-team.md)
+ [

# Step 3: Create a Slack Application
](slack-bot-assoc-create-app.md)
+ [

# Step 4: Integrate the Slack Application with the Amazon Lex Bot
](slack-bot-assoc-create-assoc.md)
+ [

# Step 5: Complete Slack Integration
](slack-bot-back-in-slack-console.md)
+ [

# Step 6: Test the Integration
](slack-bot-test.md)

# Step 1: Create an Amazon Lex Bot


If you don't already have an Amazon Lex bot, create and deploy one. In this topic, we assume that you are using the bot that you created in Getting Started Exercise 1. However, you can use any of the example bots provided in this guide. For Getting Started Exercise 1, see [Exercise 1: Create an Amazon Lex Bot Using a Blueprint (Console)](gs-bp.md)

1. Create an Amazon Lex bot. For instructions, see [Exercise 1: Create an Amazon Lex Bot Using a Blueprint (Console)](gs-bp.md). 

1. Deploy the bot and create an alias. For instructions, see [Exercise 3: Publish a Version and Create an Alias](gettingstarted-ex3.md).

**Next Step**  
[Step 2: Sign Up for Slack and Create a Slack Team](slack-bot-assoc-create-team.md)

# Step 2: Sign Up for Slack and Create a Slack Team


Sign up for a Slack account and create a Slack team. For instructions, see [Using Slack](https://get.slack.help/hc/en-us/articles/212675257-Creating-a-Slack-account). In the next section, you create a Slack application, which any Slack team can install.

**Next Step**  
[Step 3: Create a Slack Application](slack-bot-assoc-create-app.md)

# Step 3: Create a Slack Application


In this section, you do the following:

1. Create a Slack application on the Slack API Console 

1. Configure the application to add interactive messaging to your bot:

At the end of this section, you get application credentials (Client Id, Client Secret, and Verification Token). In the next section, you use this information to configure bot channel association in the Amazon Lex console.

1. Sign in to the Slack API Console at [http://api.slack.com ](http://api.slack.com).

1. Create an application. 

   After you have successfully created the application, Slack displays the **Basic Information** page for the application. 

1. Configure the application features as follows:

   1. In the left menu, choose **Interactivity & Shortcuts**.
     + Choose the toggle to turn interactive components on.
     + In the **Request URL** box, specify any valid URL. For example, you can use **https://slack.com**.
**Note**  
For now, enter any valid URL to get the verification token that you need in the next step. You will update this URL after you add the bot channel association in the Amazon Lex console. 
     + Choose **Save Changes**.

1. In the left menu, in **Settings**, choose **Basic Information**. Record the following application credentials:
   + Client ID 
   + Client Secret
   + Verification Token 

**Next Step**  
[Step 4: Integrate the Slack Application with the Amazon Lex Bot](slack-bot-assoc-create-assoc.md)

# Step 4: Integrate the Slack Application with the Amazon Lex Bot


Now that you have Slack application credentials, you can integrate the application with your Amazon Lex bot. To associate the Slack application with your bot, add a bot channel association in Amazon Lex.

In the Amazon Lex console, activate a bot channel association to associate the bot with your Slack application. When the bot channel association is activated, Amazon Lex returns two URLs (**Postback URL** and **OAuth URL**). Record these URLs because you need them later.

**To integrate the Slack application with your Amazon Lex bot**

1. Sign in to the AWS Management Console, and open the Amazon Lex console at [https://console.aws.amazon.com/lex/](https://console.aws.amazon.com/lex/). 

1. Choose the Amazon Lex bot that you created in Step 1.

1. Choose the **Channels** tab.

1. In the left menu, choose **Slack**. 

1. On the **Slack** page, provide the following:
   + Type a name. For example, `BotSlackIntegration`.
   + Choose "aws/lex" from the **KMS key** drop-down.
   + For **Alias**, choose the bot alias.
   + Type the **Client Id**, **Client secret**, and **Verification Token**, which you recorded in the preceding step. These are the credentials of the Slack application.   
![\[The Slack configuration screen.\]](http://docs.aws.amazon.com/lex/latest/dg/images/slack-10a.png)

1. Choose **Activate**. 

   The console creates the bot channel association and returns two URLs (Postback URL and OAuth URL). Record them. In the next section, you update your Slack application configuration to use these endpoints as follows:
   + The Postback URL is the Amazon Lex bot's endpoint that listens to Slack events. You use this URL: 
     + As the request URL in the **Event Subscriptions** feature of the Slack application.
     + To replace the placeholder value for the request URL in the **Interactive Messages** feature of the Slack application.
   + The OAuth URL is your Amazon Lex bot's endpoint for an OAuth handshake with Slack. 

**Next Step**  
[Step 5: Complete Slack Integration](slack-bot-back-in-slack-console.md)

# Step 5: Complete Slack Integration


In this section, use the Slack API console to complete integration of the Slack application.

1. Sign in to the Slack API console at [http://api.slack.com](http://api.slack.com). Choose the app that you created in [Step 3: Create a Slack Application](slack-bot-assoc-create-app.md).

1. Update the **OAuth & Permissions** feature as follows:

   1. In the left menu, choose **OAuth & Permissions**.

   1. In the **Redirect URLs** section, add the OAuth URL that Amazon Lex provided in the preceding step. Choose **Add a new Redirect URL**, and then choose **Save URLs**.

   1. In the **Bot Token Scopes** section, add two permissions with the **Add an OAuth Scope** button. Filter the list with the following text:
      + **chat:write**
      + **team:read**

1. Update the **Interactivity & Shortcuts** feature by updating the **Request URL** value to the Postback URL that Amazon Lex provided in the preceding step. Enter the postback URL that you saved in step 4, and then choose **Save Changes**.

1. Subscribe to the **Event Subscriptions** feature as follows:
   + Enable events by choosing the **On** option.
   + Set the **Request URL** value to the Postback URL that Amazon Lex provided in the preceding step. 
   + In the **Subscribe to Bot Events** section, subscribe to the `message.im` bot event to enable direct messaging between the end user and the Slack bot.
   + Save the changes.

1. Enable sending messages from the messages tab as follows:
   + From the left menu, choose **App Home**.
   + In the **Show Tabs** section, choose **Allow users to send Slash commands and messages from the messages tab.**



**Next Step**  
[Step 6: Test the Integration](slack-bot-test.md)

# Step 6: Test the Integration


Now use a browser window to test the integration of Slack with your Amazon Lex bot. 

1. Choose **Manage Distribution** under **Settings**. Choose **Add to Slack** to install the application. Authorize the bot to respond to messages.

1. You are redirected to your Slack team. In the left menu, in the **Direct Messages** section, choose your bot. If you don't see your bot, choose the plus icon (\$1) next to **Direct Messages** to search for it.

1. Engage in a chat with your Slack application, which is linked to the Amazon Lex bot. Your bot now responds to messages.

   If you created the bot using Getting Started Exercise 1, you can use the example conversations provided in that exercise. For more information, see [Step 4: Add the Lambda Function as Code Hook (Console)](gs-bp-create-integrate.md).

# Integrating an Amazon Lex Bot with Twilio Programmable SMS
Integrating with Twilio SMS

This exercise provides instructions for integrating an Amazon Lex bot with the Twilio simple messaging service (SMS). You perform the following steps:

1. Create an Amazon Lex bot

1. Integrate Twilio programmable SMS with your bot Amazon Lex

1. Engage in an interaction with the Amazon Lex bot by testing the setup using the SMS service on your mobile phone

1. Test the integration 

**Topics**
+ [

## Step 1: Create an Amazon Lex Bot
](#twilio-bot-assoc-create-bot)
+ [

## Step 2: Create a Twilio SMS Account
](#twilio-bot-assoc-create-fb-app)
+ [

## Step 3: Integrate the Twilio Messaging Service Endpoint with the Amazon Lex Bot
](#twilio-bot-assoc-create-assoc)
+ [

## Step 4: Test the Integration
](#twilio-bot-test)

## Step 1: Create an Amazon Lex Bot


If you don't already have an Amazon Lex bot, create and deploy one. In this topic, we assume that you are using the bot that you created in Getting Started Exercise 1. However, you can use any of the example bots provided in this guide. For Getting Started Exercise 1, see [Exercise 1: Create an Amazon Lex Bot Using a Blueprint (Console)](gs-bp.md).

1. Create an Amazon Lex bot. For instructions, see [Exercise 1: Create an Amazon Lex Bot Using a Blueprint (Console)](gs-bp.md). 

1. Deploy the bot and create an alias. For instructions, see [Exercise 3: Publish a Version and Create an Alias](gettingstarted-ex3.md).

## Step 2: Create a Twilio SMS Account


Sign up for a Twilio account and record the following account information: 
+ **ACCOUNT SID** 
+ **AUTH TOKEN** 

For sign-up instructions, see [https://www.twilio.com/console](https://www.twilio.com/console).

## Step 3: Integrate the Twilio Messaging Service Endpoint with the Amazon Lex Bot


**To integrate Twilio with your Amazon Lex bot**

1. To associate the Amazon Lex bot with your Twilio programmable SMS endpoint, activate bot channel association in the Amazon Lex console. When the bot channel association has been activated, Amazon Lex returns a callback URL. Record this callback URL because you need it later.

   1. Sign in to the AWS Management Console and open the Amazon Lex console at [https://console.aws.amazon.com/lex/](https://console.aws.amazon.com/lex/).

   1. Choose the Amazon Lex bot that you created in Step 1.

   1. Choose the **Channels** tab.

   1. In the **Chatbots** section, choose **Twilio SMS**. 

   1. On the **Twilio SMS** page, provide the following information:
      + Type a name. For example, `BotTwilioAssociation`.
      + Choose "aws/lex" from **KMS key**.
      + For **Alias**, choose the bot alias.
      + For **Authentication Token**, type the AUTH TOKEN for your Twilio account. 
      + For **Account SID**, type the ACCOUNT SID for your Twilio account.  
![\[The Twilio configuration screen.\]](http://docs.aws.amazon.com/lex/latest/dg/images/twilio-10a.png)

   1. Choose **Activate**. 

      The console creates the bot channel association and returns a callback URL. Record this URL.

1. On the Twilio console, connect the Twilio SMS endpoint to the Amazon Lex bot.

   1. Sign in to the Twilio console at [https://www.twilio.com/console](https://www.twilio.com/console). 

   1. If you don't have a Twilio SMS endpoint, create it.

   1. Update the **Inbound Settings** configuration of the messaging service by setting the **REQUEST URL** value to the callback URL that Amazon Lex provided in the preceding step.

   

## Step 4: Test the Integration


Use your mobile phone to test the integration between Twilio SMS and your bot.

**To test integration**

1. Sign in to the Twilio console at [https://www.twilio.com/console](https://www.twilio.com/console) and do the following:

   1. Verify that you have a Twilio number associated with the messaging service under **Manage Numbers**. 

      You send messages to this number and engage in SMS interaction with the Amazon Lex bot from your mobile phone. 

   1. Verify that your mobile phone is listed as **Verified Caller ID**. 

      If it isn't, follow instructions on the Twilio console to enable the mobile phone that you plan to use for testing. 

      Now you can use your mobile phone to send messages to the Twilio SMS endpoint, which is mapped to the Amazon Lex bot. 

1. Using your mobile phone, send messages to the Twilio number. 

   The Amazon Lex bot responds. If you created the bot using Getting Started Exercise 1, you can use the example conversations provided in that exercise. For more information, see [Step 4: Add the Lambda Function as Code Hook (Console)](gs-bp-create-integrate.md).

# Deploying an Amazon Lex Bot in Mobile Applications


Using AWS Amplify, you can integrate your Amazon Lex bots with mobile or web applications. For more information, see [ Interactions – Getting started ](https://docs.amplify.aws/lib/interactions/getting-started/q/platform/js) in the *AWS Amplify Docs*.