--- title: "6. Export the Bot to Alexa Skills Kit" date: 2019-09-05T23:06:51+08:00 draft: false chapter: false weight: 157 --- In this step, you will learn how to export the Lex configuration file into a JSON file and use the same file for Alexa skill development. ## Export the Bot to Alexa Skills Kit 1. Go to [AWS Lex Console](https://console.aws.amazon.com/lex) 1. Click on the Left Arrow on the top left corner ![](/images/ask/step8-export-bot.png) 1. Select your bot and click on **Action** ![](/images/ask/step8-lex-action.png) 1. Click on **Export** 1. Choose the bot version and **platform** as `Alexa Skills Kit(ASK)`. Click on **Export**, save the file ![](/images/ask/step8-export-bot-ASK.png) 1. Unzip the downloaded file and you will get the .json file. This will be used for Alexa Skill later. You can also export it as Lex format. The exported file can be used to replicate the same bot in another account. > Note: You could use [json formatter](https://jsonformatter.curiousconcept.com/) to convert the file to > standard indented json if the file's original indents is not perfect ## Import Lex Intents to Alexa Voice Interface 1. Go to the [Alexa Developer Console](https://developer.amazon.com/alexa/console/ask) 1. If you don't already have an account, you will be able to create a new one for free. Note it's not the same account for amazon.com. Sign in with your developer account 1. From the Alexa Skills Console select the **Create Skill** button near the top-right of the list of your Alexa Skills. ![](/images/ask/create-skill.png) 1. Input **Skill Name**, `Personal Banker`. This is the name that will be shown in the Alexa Skills Store, and the name your users will refer to. Also change the locale if so desired. Click Next to continue ![](/images/ask/create-new-skill.png) 1. Select the **Custom** button for the model to add to your skill and choose **Provision your own** to host your skill's backend resources. Select the **Create Skill** button at the top right. ![](/images/ask/custom-skill.png) 1. Choose "Hello World Skill" as the template to start. Click **Choose** 1. You can choose to build the Interaction Model for your skill by adding intents, slots and other attributes manually, which we have already done in Lex. So instead, we are going to re-use our Lex intents, slots. 1. On the left hand navigation panel, under the **Interaction Model**, select the **JSON Editor** tab. In the textfield provided, replace code line 5 to 23 with the code in the zip file exported from Lex. Follow the instruction below. - Select code **line 18 to 30**, delete it and replace it with the info below. ![](/images/ask/hello-world-intent.png) - Open the .json file you export from Lex in a text edit file. Copy the 3 Intents in the 'Intent'. ![](/images/ask/intent-example.png) - **Paste it back** to the Alexa console after line 18. - Select the highlighted part below. Copy it. ![](/images/ask/types-dialog.png) - Delete **types** part and **paste the json you copied** in the last step here . ![](/images/ask/json-types.png) - Input a **invocation name** `personal banker` as shown below. ![](/images/ask/9-7-e.png) - If you find it is hard to follow, replace the entire code in the textfield provided with [alexa-developer-console-personal-banker.json](https://github.com/aws-samples/aws-alexa-workshop-ask/blob/master/alexa-developer-console-personal-banker.json). Then you can skip subsequent jump to step 7: Create an Alexa Lambda function. 1. Click on **Save Model** and then **Build Model**. You should notice that Intents and Slot Types will auto populate based on the JSON Interaction Model that you have now applied to your skill ## Validation & Next step If your interaction model builds successfully, proceed to the next step. If not, you should see an error. Try to resolve the errors. In our next step of this lab, we will be creating our Lambda function in the AWS developer console, but keep this browser tab open, because we will be returning here.