Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

How to Build Your Own Amazon Echo Skill: Building It (Part 2)

DZone's Guide to

How to Build Your Own Amazon Echo Skill: Building It (Part 2)

Dive into the details of getting your Echo skill built, including using AWS Lambda functions, setting up your AWS developer account, and cobbling your skill together.

· IoT Zone
Free Resource

Cisco IoT makes digital transformation a reality in factories, transportation, and utilities. Learn how to start integrating with Cisco DevNet.

This article is part of the 4-part series about how to build your very own Amazon Echo skill. If you just landed here, you can start from Step One: Map Out Your User Commands and Response Paths.

In this series of four articles we explore how and why you should build an Alexa Skill. As a review from the first article, if you want to build a deeper connection with your users by letting them use voice commands to activate your product features and explore more of what you have offer or find new customers, Alexa skills can help you accomplish both.

In this Part 2 of 4 article let’s dive into the steps to build your Alexa skill.

Step Two: Build Your Alexa Skill

1. Create your free Amazon Developer Account.


2. Name your Alexa skill.


3. Copy the Space Geek intent schema in the GitHub repository and paste it into the Intent Schema text box.


4. Copy the Space Geek sample utterances in the GitHub repository and paste it into the text box.


Utterances are a list of possible commands an user can say to activate your Alexa skill. The more samples you provide, the more commands Alexa recognizes as relevant to activating your skill.

When you upload code to AWS Lambda, it runs by itself and requires no administration on your part.

5. Upload code into AWS Lambda.

Open a new tab (without closing your tab for the developer console) and login to your free development account at https://aws.amazon.com/. This is your Amazon Web Services (AWS) Management console.


On the Services page, select US East (N. Virginia) region in the upper right corner of the black navigation bar. This is the only region that currently supports Alexa skill development.


6. Create a Lambda function.

Select “Create a Lambda function”. At the bottom of the “Select Blueprint” page, select “Skip.” If there is no option to skip, use the sidebar menu items to select “Configure function”. Configure your triggers and in the box, select Alexa skills Kit, then “Next”.

7. Name and describe your Alexa skill

Under “Configure Function,” enter the name and description for your skill:

8. Upload your Lambda function.

Download the FactSkillTemplate.zip — you will need it for the next step. Under “Code Entry Type” select “Upload a .Zip File” and upload the zip file of your Lambda function you generated above:

9. Select your existing role if you have one.

Select “index.handler” from the Handler dropdown. Drop down the “Role” menu to create or select an existing role:

If you have used Lambda before, “Choose an existing role” will make “lambda_basic_execution” available to you in an “Existing role” dropdown. Choose lambda_basic_execution and skip to “10. Create your Lambda function”.

9b. Create a custom role if you don’t have an existing one.

Select “Create a custom role” to open a new tab in the IAM Management Console. Accept the defaults to create a new IAM Role called “lambda_basic_execution”. Select “Allow” in the lower right corner and it will return you to your Lambda function. Keep the default Advanced settings. Select “Next” and review:

10. Create your Lambda function.

Select “Create Function.” You should see the confirmation message: “Congratulations! Your Lambda function "MySpaceFacts" has been successfully created.”

From the upper right-hand corner, copy the ARN number (the ARN starts with “arn:aws:lambda:us-east-“ and ends with your function name.)

11. Configure your Lambda function.

Return to your developer console tab, where you should still be in Configuration. For Endpoint, select the “Lambda ARN (Amazon Resource Name)” radio button, then paste in the ARN. Select “No” for Account Linking. Select "Next".

Action Item for Building Your Amazon Echo Skill Part 2

Start building your Alexa skill following the steps described above:

1. Create your free Amazon Developer Account.

2. Name your Alexa skill.

3. Copy the Space Geek intent schema in the GitHub repository and paste it into the Intent Schema text box.

4. Copy the Space Geek sample utterances in the GitHub repository and paste it into the text box.

5. Upload code into AWS Lambda.

6. Create a Lambda function.

7. Name and describe your Alexa skill.

8. Upload your Lambda function.

9. Select your existing role if you have one.

9b. Create a custom role if you don’t have an existing one.

10. Create your Lambda function.

11. Configure your Lambda function.

We've written up the above secrets as part of a free help guide on designing your own Alexa Skills. You can download it here: How to Build your First Amazon Alexa Skill.

Cisco is a software company. Surprised? Don’t be. Join DevNet to explore APIs, tools, and techniques that developers are using to add collaboration, IoT, security, network priority, and more!

Topics:
iot ,amazon echo ,alexa skills ,tutorial ,aws lambda

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}