AWS Machine Learning Blog
Export your Amazon Lex bot schema to the Alexa Skills Kit
You can now export your Amazon Lex chatbot schema into the Alexa Skills Kit to simplify the process of creating an Alexa skill.
Amazon Lex now provides the ability to export your Amazon 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 Amazon Echo, Amazon Dot, Amazon Look, Amazon Tap, Amazon Echo Show and 3rd party Alexa enabled devices. The JSON configuration file contains the structure of your Amazon 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 Amazon Lex chatbot.
To create an Alexa skill, you can use your Amazon Lex bot definition file from within the ASK portal, using the following steps.
From the Amazon Lex console
- Once you have created, built, and published your bot, navigate back to the page containing the list of bots which you have currently developed.
- 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.
- 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.
- Click Create. A zip file will be generating containing your JSON file of your bot schema.
Your Amazon Lex bot schema is now ready to be used in an Amazon Alexa skill!
From the Amazon Alexa Developer Portal
- Log in to the Alexa developer portal and navigate to the Interaction Model tab, to Launch the Alexa Skill Builder (currently in Beta).
- 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.)
- Create a custom back-end for your skill in AWS Lambda.
- Connect the Lambda Function to your Interaction Model.
- 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 Amazon Lex to simplify skill creation through the Alexa Skills Kit, visit the Amazon Lex documentation and FAQs page for more details. For more information about creating an Alexa skill, see the Alexa Skills Kit.