AWS Machine Learning Blog

Export your HAQM Lex bot schema to the Alexa Skills Kit

You can now export your HAQM Lex chatbot schema into the Alexa Skills Kit to simplify the process of creating an Alexa skill.

HAQM Lex now provides the ability to export your HAQM Lex chatbot definition as a JSON file that can be added to the Alexa Skills Kit (ASK). Once you add the bot schema file into ASK, you can build an Alexa skill with it, for use on the HAQM Echo, HAQM Dot, HAQM Look, HAQM Tap, HAQM Echo Show and 3rd party Alexa enabled devices. The JSON configuration file contains the structure of your HAQM Lex chatbot, including the intent schema with utterances, slots, prompts and slot-types. The export functionality simplifies the process of creating an Alexa skill from an HAQM Lex chatbot.

To create an Alexa skill, you can use your HAQM Lex bot definition file from within the ASK portal, using the following steps.

From the HAQM Lex console

  1. Once you have created, built, and published your bot, navigate back to the page containing the list of bots which you have currently developed.
  2. Using the radio buttons, select the bot you would like to export. The Actions tab will become enabled at the top of the page once a bot is selected.
  3. From the Actions tab, select Export from the drop-down menu items, and following the modal dialogs, select Alexa Skills Kit as your Platform, and choose your version.
  4. Click Create. A zip file will be generating containing your JSON file of your bot schema.

Your HAQM Lex bot schema is now ready to be used in an HAQM Alexa skill!

From the HAQM Alexa Developer Portal

  1. Log in to the Alexa developer portal and navigate to the Interaction Model tab, to Launch the Alexa Skill Builder (currently in Beta).
  2. From the Skill Builder, paste the unzipped bot schema file into the Code Editor of your Alexa skill. (You can also drag-drop the JSON file.)
  3. Create a custom back-end for your skill in AWS Lambda.
  4. Connect the Lambda Function to your Interaction Model.
  5. From there, you can select “Build Model” from the top menu and complete any other updates to your skill information, interaction model, or configuration. Then Submit your skill for publication!

For more information on exporting your chatbot schema from HAQM Lex to simplify skill creation through the Alexa Skills Kit, visit the HAQM Lex documentation and FAQs page for more details. For more information about creating an Alexa skill, see the Alexa Skills Kit.