In this step, we will create a lambda function for Alexa backend fulfillment and configure the endpoint for Alexa.
Go to AWS Console
Click the orange Create function button. It should be near the top of your screen.
Click the radio button in the box titled “Browse serverless app repository”. We have created an application in the repository as a shortcut to getting everything set up for your skill.
Enter alexa-skills-kit-nodejs-factskill
to search for the application repository.
Click on the application. This template will create the Lambda function, grant the Alexa Skills Kit permission to invoke it, and set up an IAM role for you. It will also add the code from this GitHub repo and include the required dependencies so that you don’t have to upload them yourself
Change the application name and then Click the Deploy button at the bottom of the page.
Wait for the status of all resources to change to CREATE_COMPLETE
Click the Test App button to go to the Lambda console
Open the function that was just created by clicking on it
Scroll down the page until you see a section called Function code
Replace it with the code in alexa-lambda-personal-banker.js
,
be sure to click Save
You should see the Amazon Resource Name (ARN) a unique identifier for this function in the top right corner of the page. Copy the ARN value for this Lambda function for use in the next section of the guide
Go back to the Alexa Developer Console. You may still have a browser tab open if you follow this tutorial. Select the skill you created
Select the Endpoint tab on the left side navigation panel
Select the AWS Lambda ARN option for your endpoint. You have the ability to host your code anywhere that you would like, but for the purposes of simplicity and frugality, we are using AWS Lambda
Paste your Lambda’s ARN (Amazon Resource Name) into the textbox provided for Default Region.
Click the Save Endpoints button at the top of the main panel