Create an Amazon Lex bot - Amazon SDK for JavaScript
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China.

The Amazon SDK for JavaScript V3 API Reference Guide describes in detail all the API operations for the Amazon SDK for JavaScript version 3 (V3).

Starting October 1, 2022, Amazon SDK for JavaScript (v3) will end support for Internet Explorer 11 (IE 11). For details, see Announcing the end of support for Internet Explorer 11 in the Amazon SDK for JavaScript (v3).

Create an Amazon Lex bot

Important

Use V1 of the the Amazon Lex console to create the bot. This exmaple does not work with bots created using V2.

The first step is to create an Amazon Lex chatbot by using the Amazon Web Services Management Console. In this example, the Amazon Lex BookTrip example is used. For more information, see Book Trip.

  • Sign in to the Amazon Web Services Management Console and open the Amazon Lex console at Amazon Web Services Console.

  • On the Bots page, choose Create.

  • Choose BookTrip blueprint (leave the default bot name BookTrip).

  • Fill in the default settings and choose Create (the console shows the BookTrip bot). On the Editor tab, review the details of the preconfigured intents.

  • Test the bot in the test window. Start the test by typing I want to book a hotel room.

  • Choose Publish and specify an alias name (you will need this value when using the Amazon SDK for JavaScript).

Note

You need to reference the bot name and the bot alias in your JavaScript code.