Hello guys, welcome to the 12th session of great custom Alexa skill using AWS lambda function tutorials for beginners. In this session we will see how to use ask CLA to create skill and lambda function. In previous session we have created skin using skip key and lambda function using AWS console. Amazon also provides the API to create or manage skill and lambda function directly from the terminal. For this, we need to use ask CLA. It provides some commands by node j s, so we need to install the node first.
We also need to install AWS Eli if you also want to deploy lambda from us daily. throughout this series, I will use Visual Studio code as a text editor. You can use different if you want, and preferring this because it has built in Terminal console so I don't need to open Command Prompt or terminal in different video. I have downloaded both CLA. Let us double click on AWS Eli to install it. I have already installed so cancel it.
After installing these we need to delete root access keys if you have for this open AWS console such Iam expand delete Select Continue expand access key and click on Create access key button. I have already created one so it displays it And I'm going to create a new one. Now we need to configure AWS CNI. For this open the terminal right AWS configure, it will ask for access keys basically pasted and also a secret key. You can skip other options to. Here we have configured AWS CNI.
After these you need to install Node for ask see like, if you have already installed then skip the step and install ask SDK globally. links for all installer or modules are available in resources. It will take some time to download dependent packages. After this, I'm restarting Visual Studio code. Now we need to configure as CLA. For that right ask and then it will ask to select profile.
I have created four to five different profiles, so they are listed here. If you're running the first time, then we need to create a new profile right name for new profile, then asked to choose AWS file for lambda, we need to select default. It will open the browser login and give required permissions. Here you can see that our new profile is created. To create new skill project we need to use ask new command. Then it will ask name that you want to use for skill.
We can also pass it as option for this command, right? Ask new skill name option and specify a name that you want to use. For scale, then we can optionally set mean for lambda function to use lambda name option, but you cannot use it when you are using template. Here it was initializing scale project and it was creating Amazon provides some templates that we can use while creating new skills such as fax, feed, grease, etc. If you want to use those templates, then you can write iphone iphone template and specify the name of the template that you want to use. Let us open this directory.
Here is a new folder with the name of the scheme. Let us expand folder name lambda within that it contains the index.js file that is opening Here is a JavaScript code that will deploy it in AWS lambda function. We will understand its structure and modify it in next session. package dot Jason file for the node. Here it includes a dependency for Alexa SDK. I'm using the latest version of ask CLA so it was added Alexa SDK core in studio version one.
Here is a model. It contains Jason for interaction model. As we have seen interaction model contains intense plots and utterances. If your scale supports multiple languages, then you can add new files with local name and scale the JSON file contains configuration for launch tab, enter description, example phrase now It also contains endpoint detail. Here we will use a lambda function. If your skill required any interface or permissions then it will be added here.
Let us see what we have learned in this session. To use s3 ally we need to install AWS CLA and no Gs. After these use ask any command to initialize your account. Use ask new command to create new skill, we need to pass key name and optional lamda name and we also saw directory structure of ask CLA and coding structure of lambda function. Thanks for watching this video. If you have any doubts, please feel free to contact me.
Have a nice day.