Now that we have created the interaction model (the frontend), it’s time to connect that to our programming logic (the backend).
For this course, we will be using AWS Lambda functions to host our programming logic. Lambda is a server-less computer service from Amazon Web Services (AWS) that runs your code in response to events. For our Alexa skill, you will trigger the Lambda function when you start the new skill.
For Now, Use our Lambda function
As you will see by the end of this lesson, when we launch the skill, Alexa will respond with what’s on line 22 — which is currently set to “Hello, Codecademy”. In the response sent from Lambda, this phrase is called output speech.
Connecting to the Lambda Function
To connect the frontend to a Lambda function (the backend) you must provide its Amazon Resource Name (ARN), which is a unique identifier that represents our Lambda function.
The ARN for our Lambda function is:
We will be using this ARN to connect our skill’s frontend to our Lambda function in the next exercise. When a user interacts with your skill, Alexa will send the request to the Lambda function with that name.