menu
arrow_back

Working with Alexa: Build a Decision Tree Skill

Working with Alexa: Build a Decision Tree Skill

57 minutes 10 Credits

Working with Alexa: Build a Decision Tree Skill

SPL-129 - Version 2.4.4

© 2019 Amazon Web Services, Inc. and its affiliates. All rights reserved. This work may not be reproduced or redistributed, in whole or in part, without prior written permission from Amazon Web Services, Inc. Commercial copying, lending, or selling is prohibited.

Errors or corrections? Email us at aws-course-feedback@amazon.com.

Other questions? Contact us at https://aws.amazon.com/contact-us/aws-training/

Overview

In this lab, you will build a web service to handle notifications from Alexa and map this service to a skill in the Amazon Developer Portal. You will create a Decision Tree skill using sample code for this lab, which you can use as a template for your own skill after completing the lab. You can make this skill available on your device and to all Alexa users after certification. You will use both the AWS Console and the Amazon Developer Portal in this lab.

You do not need an Alexa device. The Developer Portal provides testing tools that work in a browser.

Topics covered

By the end of this lab you will be able to:

  • Create an Alexa Decision Tree skill in the Amazon Developer Portal
  • Create and configure an interaction model for the Alexa skill
  • Create a Lambda function and configure the Alexa skill to use it
  • Test the skill using developer tools and optionally an Alexa device

Other AWS Services

Other AWS Services than the ones needed for this lab are disabled by an IAM policy during your access time in this lab. In addition, the capabilities of the services used in this lab are limited to what’s required by the lab and in some cases are even further limited as an intentional aspect of the lab design. Expect errors when accessing other services or performing actions beyond those provided in this lab guide.

Amazon Alexa Skills

Alexa is the voice service that powers Amazon Echo. Alexa provides capabilities, called “skills”, which enable customers to interact with devices using voice (answer questions, play music, and more).

The Alexa Skills Kit (ASK) is a collection of self-service APIs, tools, documentation, and code samples that make it easy for you to develop your own Alexa skills, which you can then publish. ASK supports simple command-oriented skills, such as "Alexa, ask Greeter to say hello world" as well as sophisticated multi-command dialogs and parameter passing, such as "Alexa, what is this weekend's weather forecast?" The Alexa Skills Kit is a low-friction way to learn to build for voice. You can get a prototype up and running within hours.

This lab will walk you through creating a decision tree skill. After you complete the lab, you can use the skill you create as a template for your own skill. Learn more about developing with the Alexa Skills Kit at https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit.

AWS Lambda

AWS Lambda is a compute service that provides resizable compute capacity in the cloud to make web-scale computing easier for developers. Upload your code to AWS Lambda and AWS Lambda takes care of provisioning and managing the servers that you use to run the code. AWS Lambda supports multiple coding languages: Node.js, Java, or Python.

You can use AWS Lambda in two ways:

  • As an event-driven compute service where AWS Lambda runs your code in response to events, such as uploading image files as you’ll see in this lab.
  • As a compute service to run your code in response to HTTP requests using Amazon API Gateway or API calls.

AWS Lambda executes your code only when needed and scales automatically, from a few requests per day to thousands per second. For most developers, the Lambda free tier is sufficient for supporting an Alexa skill. See the official Amazon Web Services Documentation for Lambda at https://aws.amazon.com/documentation/lambda/. For pricing details, see https://aws.amazon.com/lambda/pricing/.

Start Lab

Notice the lab properties below the lab title:

  • setup - The estimated time to set up the lab environment
  • access - The time the lab will run before automatically shutting down
  • completion - The estimated time the lab should take to complete
  1. At the top of your screen, launch your lab by clicking Start Lab

If you are prompted for a token, use the one distributed to you (or credits you have purchased).

A status bar shows the progress of the lab environment creation process. The AWS Management Console is accessible during lab resource creation, but your AWS resources may not be fully available until the process is complete.

  1. Open your lab by clicking Open Console

This will automatically log you into the AWS Management Console.

Please do not change the Region unless instructed.

Common login errors

Error : Federated login credentials

If you see this message:

  • Close the browser tab to return to your initial lab window
  • Wait a few seconds
  • Click Open Console again

You should now be able to access the AWS Management Console.

Error: You must first log out

If you see the message, You must first log out before logging into a different AWS account:

  • Click click here
  • Close your browser tab to return to your initial Qwiklabs window
  • Click Open Console again

Join Qwiklabs to read the rest of this lab...and more!

  • Get temporary access to the Amazon Web Services Console.
  • Over 200 labs from beginner to advanced levels.
  • Bite-sized so you can learn at your own pace.
Join to Start This Lab
home
Home
school
Catalog
menu
More
More