Starting up with Amazon Alexa Skill Development

About Amazon Alexa

With the power of AI reaching the hand of people by different means (Active or Passive formats) Amazon presented the world with an AI bot named “Alexa”.

Alexa is a bot for the user who actively participate to take care of users need.

Few activities that can be done by Alexa are:

  • Voice greetings
  • Voice command Intraction
  • Smart Home Controls
  • Booking an Uber/Ola
  • Ordering the food
  • Searching and Ordering stuffs on Amazon
  • Keeping track of the package
  • Keeping track of reminders
  • ……………
  • …………..
  • And many more

What is an Alexa Skills

All the activities performed by the Amazon Alexa is performed by the skills “Enabled” by the user. Each of the skill contains one or more codes to handle some need of the user (from greeting “Hello” to Booking a Cab can be anything.

What we will see here

We will look into the following here:

  • Starting with the first Alexa Skill App Creation
  • Learn about End Point in Amazon AWS
  • Multi Language Support
  • Apply for certification
  • Track the live skills analytics

So let us start with the first one that is Starting with the first Alexa Skill App Creation

Starting with the first Alexa Skill App Creation

Let us start with our first skill:

  • We will be making a Joke App named “Comedy Jokes” which will serve some jokes whenever user prompts “Alexa, open comedy jokes”

Let us start with the Amazon alexa dev account:

  • Now on the next page create an Account or you can use your amazon account credentials to login.
  • After Login you will be able to see “Your Alexa Consoles > Skills” if not then click on the Skills link under Your Alexa Consoles Link top right corner screen

Let us start with the New Skill:

  • On the Skill Consoles click on the “Create Skill” button
  • Now on the next screen enter the Skill Name and choose the language
  • Click Next
  • In next screen Choose a model to add to your skill. Here you can choose from the existing model or create a new model from scratch. We will choose Custom Model for our Skill
  • Now Click on the Create skill button
  • You will be landing into your Skill page
  • Here you will be able to see on the right side the Skill builder checklist and the required things to get the skill running

Let us now start filling all the steps in the checklist

  1. Invocation Name
  • Invocation is one of the build checklist item in the menu on the left sidebar click on it.
  • This is what the user says to invoke the Skill
  • Eg: Alexa, open comedy jokes
  • For us Let us use comedy joke as the Invocation Name and save the model “Save Model”

2. Intents

  • Intents are the request made by the user
  • Click on the “+ Add” next to intents menu item
  • We can choose existing intents from Alexa’s built-in library or create custom intent
  • We will choose Custom Intent name it comedyjokes
  • Inside this new intent we have to add some Sample Utterances (These are the sample which can be told by the user and grouped under one Intent)
  • Eg: “open comedy jokes”
  • We will add a few
  • The whole details about the Intents Slots you can find in the official document here
  • Now “Save Model”

3. Build Model

  • Now we will build the model by clicking “Build Model”
  • It will take some time for the build to complete

Now the Skill is ready but needs the “End Point” to do all the processing of request and present with the response which we will see in next part.

In this Part we will see Learn about End Point in Amazon AWS:

Now when the skill is ready and built we need to put the End Point to make the skill make some proper response.

  • End Point
  • It is one of the menu item
  • Help to connect to the services which provides the response to the intent
  • We can have AWS Lambda ARN as the End Point or can use or custom services hosted on HTPPS on our server
  • We will be using AWS Lambda ARN for our skill. So select the AWS Lambda ARN in the End Point page

Now Let us get the backend ready:

  • Go to URL
  • You can use your amazon profile to login
  • But to use the service you need to provide a payment Credit/Debit card data for a minimal transaction don’t worry it will be returned back to you. You won’t be charged until you hit a limit.
  • Now I am assuming you are ready with your account and logged in we can proceed
  • Search for “Lambda” service and click on it
  • Now please keep in mind we will need Alexa Skill Kit so we need to choose proper region for deploying our function
  • We can choose region from top left corner
  • The Alexa Skill Kit is available on only few region as follows (at current when I am writing this blog)
  • > Asia Pacific (Tokyo)
  • > EU (Ireland)
  • > US East (N. Virginia)
  • > US West (Oregon)
  • We will use Asia Pacific (Tokyo) for our project
  • Reach inside Lambda > Function
  • Create new function using “Create Function”
  • Now in next screen select the data Blueprints
  • Search alexa
  • Select alexa-skill-kit-sdk-factskill
  • Now click Configure button at the bottom right
  • In Next screen
  • Fill the name as comedyjokes
  • Create new or use existing Role as lambda_basic_execution (If already created one then chose from dropdown else select create custom role which will open a new page their just check it showing lambda_basic_execution and then click allow which will bring you back)
  • Click on the Create Function on the bottom right
  • In the new screen
  • Select Alexa Skills Kit as trigger from the left side which will add it in the triggers
  • In the Configure Trigger paste the skill id from the End Point in Lambda AWS ARN section and click Add
  • Save everything using “Save”
  • Now Let us get the ARN number to the End Point > Default Region and Save Endpoints
  • The current Blueprint alexa-skill-kit-sdk-factskill gives you the syntax in your Lambda function to return facts which can be replace by jokes of your wish
  • To see that click on the comedyjokes in the Designer section of Lambda screen as in previous image
  • Scroll down to see the function where you will find a section with data where you can add your jokes.

Now we will Test our application is working.

Abhishek Mallick·
6 min
6 cards

Read “Starting up with Amazon Alexa Skill Development” on a larger screen, or in the Medium app!