## Create AWS Lambda Function

 <ol>
 <li> Log in to the AWS Management Console

<li>  Navigate to Lambda Services

<li> Click  "Create Function"

<li> Ensure  the "Author From Scratch" tile is highlighted

<li> Fill in the following and then click "Create function"

```
    Function Name  (use 'call_NLC' )  
    Runtime (select Python 3.6) 
    Execution Role (select 'Use an existing role')
    Existing role (select 'lambda_basic_execution')
```
    
<li> Select the  "Upload from ZIP file" in the drop down.

<li> Upload the <strong>Archive.zip</strong> file  found in the <strong>sourcecode </strong> folder of the github repository.

 <li > Open  <strong>call_NLCv2.py</strong> in the console editor

<li> Update  the <strong>NLC_APIKey</strong>  and <strong>NLC_ CLASSIFIER_ID</strong>  variables  with the values determined in the NLC Training Step viz.,

```python
#Obtained from IBM Cloud Console
NLC_APIKEY=""
NLC_CLASSIFIER_ID=""  
```

<li> Click Save.   <strong>Leave the browser page open.</strong>

<li> On the configuration page,  select <strong>Alexa Skills Kit</strong> from the Designer Drop down.

<li> Specify the <strong>Skill ID</strong>, which was defined earlier in the <strong>Create Alexa Step</strong>.

<li> Click Add, then Click Save.

<li>Set the <strong>AMZN_ASK_SKILL</strong> parameter, which was defined earlier in the <strong>Create Alexa Step</strong>, in the Python Code as well viz.,

```python
#Obtained from  Service Endpoint Definition in the Alex Developer Console
AMZN_ASK_SKILL= ""    
```

</ol>

 

[![return](../buttons/return.png)](../README.md#Step-3a-Create-AWS-Lambda-Function)

