Create Your Lambda Function

In this course, you will learn how to create your own Lambda function using the AWS console.

Start[missing "en.views.course_landing_page.learn-alexa.course_illustration" translation]
Chevron Left Icon
Creating Your Lambda function
Lesson 1 of 2
Chevron Right Icon
  1. 1

    To recap what we learned in the last lesson, AWS Lambda is where our code lives. When a user asks Alexa to open our skill, it is routed to our AWS Lambda function. The AWS Lambda function provides ...

  2. 2

    If you already have an AWS account, sign into the AWS console at aws.amazon.com , and skip to the next exercise. --- #### Create an AWS Account (Free Tier) --- If you do not have an AWS accou...

  3. 3

    --- #### Select AWS Lambda --- 1. Make sure you're logged in to the AWS console at aws.amazon.com 2. Click Services at the top of the screen, and type "Lambda" in the search box. You can al...

  4. 4

    ---- #### Create Lambda Function ---- If you haven't created a Lambda function before, click the orange Get Started button near the center of your screen. If you have created Lambda function b...

  5. 5

    We are now ready to configure our Lambda function. We will start off by giving our function a Name. These values will only be visible to you, so you can name the function anything you want. I...

  6. 6

    The index.js file on the right contains the code from the Build Your First Skill course. We will use this code to create our own function, but before we do that, let's make it a bit more fu...

  7. 7

    We are now ready to paste our code into the AWS Lambda function code section.

  8. 8

    We would like this Lambda function to be triggered when our users ask Alexa to start our skill. To set the trigger: - Click on the Triggers tab - Click on + Add Trigger - Click on the das...

  9. 9

    Once you hit the Create Function button, you will see a "Congratulations! Your Lambda function has been successfully created..." message. We are now ready to connect our Lambda function to th...

  1. 1

    In the first lesson, you copied code from Codecademy and pasted it into your AWS account. In this lesson, we will walk you through that code, which lays the foundation for intermediate level Alexa ...

  2. 2

    When Alexa sends a request to your Lambda function, the script needs to handle those requests. All of these requests are handled by an object named [...] . In the next exercise, we will popul...

  3. 3

    Inside of our [...] object, we will map our skill's intents to our interaction model. If we wanted to handle an intent called [...] , we could add it to our [...] as a key of the same name. ...

  4. 4

    In the last exercise, we created a handler for the [...] , but we didn't add any code to it — in this exercise, we'll include two methods that respond with what Alexa says. The Alexa SDK li...

  5. 5

    You may recall that while testing our skill in Lesson 1, we requested a response from our skill by using two different style phrases - Style 1: "Alexa, tell code academy hello" and **Style...

  6. 6

    We will now add a response for our Launch Request using the [...] and [...] methods as we did for [...] in Exercise 4. This is what Alexa will speak back when the user says "Alexa, open cod...

  7. 7

    Now that we have our handlers in place, we have one more step to complete our Lambda function — add a function that AWS Lambda invokes when Alexa executes your code. This is required for eve...

  8. 8

    --- #### One: Set up the Alexa object --- Inside the Lambda handler function, we will add the following line: [...] This will set up an [...] object for us to work with, and accepts two par...

What you'll create

Portfolio projects that showcase your new skills

Pro Logo

How you'll master it

Stress-test your knowledge with quizzes that help commit syntax to memory

Pro Logo

Create Your Lambda Function

Start[missing "en.views.course_landing_page.learn-alexa.course_illustration" translation]