5 common questions how to build an Amazon Alexa Skills

5 common questions how to build an Amazon Alexa Skills

1. Alexa Skill, where to start from ?

The idea of this article it’s to help you to develop a skill from scratch or based on a starter pack, this is an example alexa-skill-starter-pack-typescript from my github account. I dont’ want to discuss too much about this starter pack, because you can find more details how to use it or where to start from in the README.md. So if you want to learn more about how to build alexa skill, keep reading.

Recently, I started a new project, for the Spanish market. At this moment the market it’s in the beginning phase, I’ll probably disclosure more details in the future posts, but for the moment it’s not very important. . Don’t

When I recently started the research, I had few questions about we will learn below:

2. How to build Alexa Skill ?

When I started it was very tough for me to understand where to start from, what to read first or how to know what I need to learn. If you are here, probably you started already to read some documents from Amazon and guess what ?! you already discovered that Amazon have a comprehensive documentation about how to build a custom skill and the documentation explains very well how to do it. You don’t have to read all, just to understand basics, keep reading this for help.

I started to read about what it’s an Invocation Name, Intents, Intent Slots, Utterances, Slot Types. So if you check the links, you’ll find the official definitions on Amazon Alexa Developers Portal, but let’s explain them more simple than that.

Invocation Name

The invocation name represents the name used to invoke your skill. So if for example you want to build a skill which presents news about technology, a good invocation name can be “technology news” or “technology facts”, so this it’s the name which will open your skill, like you enter the name of a website in the web browser to open that website.

There are some requirements about choosing the invocation name and you can read them here.


So for the moment you know how to open the skill, but now we have the skill, how you can ask Alexa to open a section? Referring to the example presented before, we have a skill about technology news, but this it’s a generic subject. If you want that your skill to be able to present informations about Artificial Intelligence, Programming Languages, New Smartphones etc.., you can create an intent for each of these departments. So when users says ‘Alexa, ask technology news’, Alexa will start a new session for my skill, but after that let say that user wants news about Artificial Intelligence and he will say something like ‘Give me news about Artificial Intelligence’ (this sentence it’s an utterance, we’ll discuss in the next chapter about them), defined under Artificial Intelligence intent, so Alexa will know, that my intention it’s to get information about Artificial Intelligence.

Let’s recap, an intent represent an action wanted by user, what he needs. Here you can find some rules about how to choose the best name for your intents. As well, there are some built in intents which can be found here.


As I already told you, an utterance represents a sentence which it’s part from an Intent and define particularly that Intent. This it’s a very important part, that you should focus on and think for all variations which point to the same idea or multiple ways that a user can ask the same thing. For example, if I want news about Artificial intelligence, you can say it as below:

  1. Offer me news about Artificial Intelligence
  2. Give me informations about Artificial Intelligence
  3. I want news about AI
  4. More information about AI

Don’t be lazy and please not overrate your user, because not all of them are smart or maybe they are not used with AI, so please have in mind that your user can be not so clever and in that way, you’ll make it better. Add as much as possible utterances you can to cover all the variations that a user can ask for an intent.

If you want to know best practices and recommendations please visit this or rules check here.

Intent Slots

So now, you know what it’s an intent and an utterance, but an intent slot it’s like a variable. For example if we have an intent to get distance between two points, point a to point b, we will have utterances like:

  1. Give me distance from Paris to New York
  2. How long it’s between Budapest to Bucharest

So we can identify two variables, pointA and pointB, now we can rewrite rules like:

  1. Give me distance from {pointA} to {pointB}
  2. How long it’s between {pointA} to {pointB}

Alexa will match the value in his slot. You can read more about how to identify slots inside utterances or best practices here. A slot can have a type, so if you want to know how to assign a slot type to a slot read here.

Slot Types

A slot type represents the type of slot, it’s like a variable type. There are default value builds by Amazon. If you want to discover best practices you can find here

You can exercise more by doing on your own in the Developer Console

3. How to run a server locally ?

You can do it simple, just by downloading [ngrok](https://ngrok.com/) and create a server with the following code

import * as express from "express";
import * as bodyParser from "body-parser";
import { LambdaHandler } from "ask-sdk-core/dist/skill/factory/BaseSkillFactory";
import { RequestEnvelope } from "ask-sdk-model";
import { AddressInfo } from "net";

import { handler } from './lambda/custom/index'

// Convert LambdaFunction to RequestHandler

function ConvertHandler(handler: LambdaHandler): express.RequestHandler {
    return (req, res) => {
        handler(req.body as RequestEnvelope, null, (err, result) => {
            if (err) {
                return res.status(500).send(err);
            return res.status(200).json(result);

// create server
const server = express();
const listener = server.listen(process.env.port || process.env.PORT || 3000, function () {
    const { address, port } = listener.address() as AddressInfo;
    console.log('%s listening to %s%s', server.name, address, port);

// parse json

// connect the lambda functions to http
server.post("/", ConvertHandler(handler));

Take a look at this alexa open source project.

Open Terminal and run

$ ./ngrok http -bind-tls=true -host-header=rewrite 3000

Copy the https link and go to Alexa Console, under Endpoint section, select TTPS and paste the link in Default Region input field. From the below dropdown, choose My development endpoint is a sub-domain of a domain that has a wildcard certificate from a certificate authority.

Every time when you run the ngrok, you need to update the endpoint url.

4. Should I choose Lambda Function or HTTPS server ?

Depends by your skill, but probably the most of you can use Lambda Function.

Why to choose Lambda:

  • you don’t need to administrate any resource
  • don’t need SSL certificate
  • don’t need to verify where requests come from
  • AWS Lambda run only when a request comes
  • First 1M requests per month are free. Read more about pricing

Read here more about connecting Alexa with AWS Lambda or here to create a Lambda for Alexa.

Requirements for HTTPS Web Service:

  • The service must be Internet-accessible.
  • The service must adhere to the Alexa Skills Kit interface.
  • The service must support HTTP over SSL/TLS, leveraging an Amazon-trusted certificate.
  • The service must accept requests on port 443.
  • The service must validate that incoming requests are coming from Alexa.

If you want to read more about configurations and requirements check here.

5. Where to start coding from ?

Before to start any code, I suggest you to choose an SDK, if you want to code in javascript, SDK v2 it’s a better option than v1 and after that, you can take a look throw other alexa open source projects. You can find basic examples on Alexa’s Github profile, but can search for more: alexa-typescript-hello-world, alexa-romanian-radio, alexa-lambda-typescript. I really recommand you to choose an sdk because it’s more easier to interact with Amazon Alexa API.


What you’ve learned here will offer you a better overview about how to create alexa skills. You’ve learned about alexa skill intents, alexa slot types, alexa skill utterances, how to run a server locally and why to choose a Lambda function.

What alexa skill do you want to build ? Please leave me a comment and I can offer you more advices.



Related Posts

Tools for Analyzing Your Competition

Before knowing where your business stands, you should look at the market and your competition. You need to know what marketing tactics and strategies are working for your audience, what traffic the competition has, and how they position.

Free Online Photo Editor with Cool Effects | Edit Images Easily

Transform your images with our free online photo editor with cool effects. Add filters, adjust colors, and apply creative enhancements. Edit your photos easily and make them stand out.

How to find the size of a table in SQL?

Learn how to determine the size of a SQL table with this informative guide. Discover efficient methods for measuring table size.

MongoDB Query date by _id field

Query date by _id in mongodb. Straighforward guide to solve your issue right away.

Unleashing the Power of Free API for Scrape Reverse Geocoding

Learn how to harness the potential of reverse geocoding with our beginner's guide to scraping APIs for free. Unlock the power today.

Discover the Power of Whatsapp-web.js for Safe and Easy Automation

Automate WhatsApp with ease using Whatsapp-web.js, a NodeJS client library that connects through the official WhatsApp Web app, reducing ban risks. Perfect for user or business accounts.

Website tours js tools

Tools to create live tours for your web project using js libraries.

Unlocking SaaS Marketing Success: Essential Resources to Learn and Grow

Discover a comprehensive collection of valuable resources to master the art of SaaS marketing.

Where to launch your startup

Do you wanna launch grandiosely your startup? Get a list of platforms where people can discover your project and can push your project directly to the sky.

Email campaign improving my SaaS convertion - Manager Flota

Users subscribe to your SaaS, but don't let the money on your table. Here's how I do it!