Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

Outline

Serverless Alexa Skill Example

This example demonstrates how to setup your own Alexa skill using AWS Lambdas.

Use-cases

  • Building custom Alexa skills

How it works

In the Alexa Developer Portal you can add your own skill. To do so you need to define the available intents and then connect them to a Lambda. You can update and define the Lambda with Serverless.

Setup

In order to deploy the endpoint simply run

serverless deploy

The expected result should be similar to:

Deploying "aws-node-alexa-skill" to stage "dev" (us-east-1)

✔ Service deployed to stack aws-node-alexa-skill-dev (35s)

functions:
  luckyNumber: aws-node-alexa-skill-dev-luckyNumber (1.1 kB)

Next we need to setup an Alexa skill. Once you've signed up for the Amazon Developer Platform visit https://developer.amazon.com/edw/home.html. There you should see the following screen:

Welcome

Next click on Add a new Skill:

Add Skill

Go through the steps and fill in all the required fields e.g. Intent Schema and Sample Utterances:

Intent Schema

{
  "intents": [
    {
      "intent": "GetLuckyNumbers",
      "slots": [
        {
          "name": "UpperLimit",
          "type": "AMAZON.NUMBER"
        }
      ]
    }
  ]
}

Sample Utterances

GetLuckyNumbers what are my lucky numbers
GetLuckyNumbers tell me my lucky numbers
GetLuckyNumbers what are my lucky numbers lower than {UpperLimit}
GetLuckyNumbers tell me my lucky numbers lower than {UpperLimit}

Skill Information Interaction Model

Fill in the Lambda ARN which was printed or run serverless info to retrieve the ARN again.

Configuration

Next up visit the test page, fill in the utterance and click on Ask LuckyNumbers.

Test Test Test Test

You should have received a response containing the text Your lucky number is followed by your lucky number :)

Check out this Amazon guide to learn more about how to submit your skill for publication.

Morty Proxy This is a proxified and sanitized view of the page, visit original site.