Node.js Tutorial

Build a Voice Experience with the Node.js Tutorial for the Alexa Skills Kit

Start building for voice with Alexa

Learn to build for voice with Alexa, Amazon’s voice service and the brain behind millions of devices including Amazon Echo. Alexa provides capabilities, or skills, that enable customers to create a more personalized experience.

Start building for Alexa with this quick walkthrough of the skill-building process. You’ll end with a simple but complete Alexa skill that can run on Amazon Echo or any device with Alexa. This tutorial uses the Alexa Skills KitAWS Lambda, and Node.js.

How fast can you build? Let us know by tweeting @alexadevs.

Node.js quote

Sign in to Amazon Web Services (AWS) and create a function

Log in to the AWS Management Console. If you haven’t done so already, you’ll need to create a free account.

From the list of services, select Lambda.

In the upper right corner of the console, select the region drop-down. Select US East (N. Virginia), which is a supported region for Lambda functions used with the Alexa Skills Kit.

Select Create a Lambda Function. Or select Get Started Now if this is the first Lambda function on your account.

In the search filter box, type alexa.

Select blueprint alexa-skills-kit-color-expert.

Make sure the trigger is set to Alexa Skills Kit, then select Next.

Name your function. We’ll use myColorSkillNodejs for this walkthrough.

Ensure pop-ups are enabled in your browser. Scroll down the page. Then, under Lambda function handler and role, choose Create a custom role.

When the IAM role management console opens, select Allow to go back to the previous Lambda console.

The role is now populated with lambda_ basic_execution. Choose Next, then choose Create function.

Copy the Amazon Resource Name (ARN) displayed in the upper-right corner of the console that starts with arn:aws:lambda....

Use the Amazon developer portal to configure your skill

Sign in to the Amazon developer portal. If you haven’t done so already, you’ll need to create a free account.

From the top navigation bar, select Alexa.

Under Alexa Skills Kit, choose Get Started.

Choose Add a New Skill.

Name your skill. This is the name displayed to users in the Alexa app. For this example, we’ll call it Color Picker.

Create an invocation name. This is the word or phrase that users will speak to activate the skill. For this walkthrough, we’ll use the skill name Color Picker (case-sensitive). Users will say, "Alexa, open Color Picker" to interact with your skill. Choose Next to continue to development for Color Picker.

Choose Next to continue to development for Color Picker.

In the Intent Schema box, paste the following JSON code.

    "intents": [
            "intent": "MyColorIsIntent",
            "slots": [
                    "name": "Color",
                    "type": "LIST_OF_COLORS"
            "intent": "WhatsMyColorIntent"
             "intent": "AMAZON.HelpIntent"

Under Custom Slot Types, choose Add Slot Type.

Enter type LIST_OF_COLORS, and enter the following values.


Enter additional values if you'd like, then choose Save.

Under Sample Utterances, enter all the phrases that you think users might say to interact with your skill. The more phrases you enter, the better the results. For our example, paste the following:

WhatsMyColorIntent what's my favorite color
WhatsMyColorIntent what is my favorite color
WhatsMyColorIntent what's my color
WhatsMyColorIntent what is my color
WhatsMyColorIntent my color
WhatsMyColorIntent my favorite color
WhatsMyColorIntent get my color
WhatsMyColorIntent get my favorite color
WhatsMyColorIntent give me my favorite color
WhatsMyColorIntent give me my color
WhatsMyColorIntent what my color is
WhatsMyColorIntent what my favorite color is
WhatsMyColorIntent yes
WhatsMyColorIntent yup
WhatsMyColorIntent sure
WhatsMyColorIntent yes please
MyColorIsIntent my favorite color is {Color}

Choose Next and wait until the interaction model finishes loading in just a few seconds.

Select the endpoint AWS Lambda ARN. Select the appropriate geographical region. Paste the ARN code in the box that appears. Ensure No is selected for Account Linking, and choose Next.

Test your skill one of three ways

Test your skill on your Amazon Echo, Echo Dot, or any Alexa device by saying, "Alexa, open Color Picker."

Use the Service Simulator from the Test step of Color Picker development. Try entering Open Color Picker or My favorite color is red to see how Alexa responds.

Try the Echo Simulator Community Edition at Simply click and hold the microphone icon and speak your commands.


Congratulations! You've created your very first Alexa skill. Now build a skill that's all your own.

With the Alexa Skills Kit (ASK), designers, developers, and brands can build engaging skills and reach millions of customers. ASK is a collection of self-service APIs, tools, documentation, and code samples that makes it fast and easy for you to add skills to Alexa. With ASK, you can leverage Amazon’s knowledge and pioneering work in the field of voice design.

Start building your next skill today.