Part 1: Just the Facts, Alexa
I have a confession to make. I am in love with Alexa. “Alexa who?,” you ask? You know, THE Alexa. Amazon Echo’s Alexa. (Who could also be called Amazon or Echo.) I’m not ashamed of this. In fact, I embrace it. It fits perfectly with a big change in my life: the birth of my daughter Chloe. Chloe is now over 1 year old, and very mobile. It takes all of my attention and more to keep up with her.
This is why I love Alexa. It helps me do just a handful of important things while I’m entertaining Chloe at the house:
- Listen to music
- Listen to the news
- Add to our shopping list
Seriously, thats it. Those 3 things are worth every penny I spent on the Echo. (About 20,000 pennies if you’re counting.) But this isn’t what I’m writing about today. Today I want to talk about my newbie experience developing a few Alexa Fact Skills.
There are currently less than 1,000 Alexa Skills written for the Echo. A very small set considering how long this capability has been out and how powerful the platform is. I’m sure Amazon was thinking the same thing, and quickly put a lot more work into helping developers build Skills. On April 1st they sent an email out with a step-by-step template on creating an Alexa Fact Skill using AWS Lambda and Alexa Skills Kit (ASK...get it?), so I decided to give it a try. Here is my play-by-play of this experience (with director commentary) as Part 1 of a three-part article. In Part 2 and 3 I will dive deeper into Alexa Skills development and showcase some more interesting applications.
In order to create a Skill, you need somewhere to host it. I decided to try out AWS Lambda given the suggestion from Amazon. I previously had never used AWS Lambda and was really impressed. It is a super lightweight server option for hosting a “stateless” service, and incredibly easy to set up. Another big plus is the cost. The first million requests per month are free! Downsides are that the language options are somewhat limited (but they keep adding more): Java, Python and Node. Also a downside, the management console interface was clearly written by a developer and not directed by any usability expert. (I could write a whole article about this fact.) I ended up choosing Node for my language of choice when building the Skills. Unfortunately the way it is currently set up, I am required to zip the code (zip it at the file level, not the containing folder level!), load it onto the server, then run my Skill*. If it threw an error, I had to monitor the logs to see what the potential issues were, and this was fairly laborious. But in all, I found Lambda to be super cool and plan to use it more in the future.
The template that Amazon provided for creating your own Fact Skill was really easy to follow. I started with this, then began modifying it for my own needs. I created my first Alexa Skill called My Spirit Animal. (I would provide a direct link but Amazon has yet to create a public library for all third party skills.) The My Spirit Animal Skill is basically this: You ask Alexa “Alexa, ask Oh Wise One, what is my spirit animal?” Oh Wise One will randomly pick an animal from a list of options, including a short description, and let the user know. Simple and entertaining. After that Skill I completed two more: Wiggly Words for learning interesting words and their corresponding definition, and Go Fish! which gives you random facts about fish. (I love everything about fish.)
Alexa Skills Kit
The Alexa Skills Kit developer console is fairly easy to navigate. Using some of their examples as a template, I found it easy to modify those and change for my needs as I built my own Fact Skills. As with the AWS Lambda interface, it is clear that a developer built this console and not a designer. Some of the required steps are not very user friendly, especially when it times out and you have to log back in. But overall the experience was pleasant. From what I can tell, they are making improvements to it fairly regularly and the experience keeps getting better.
I’m excited to move on to building more complicated Skills. For my current project I am pulling data from an external API to give more interesting answers to questions I ask my Echo, complete with Custom Slot Types to allow the user some variability on what type of information they are looking for. I’m using the Tide Pooler Alexa Skill example as a basis and slowly crafting my new skill from the ground up. In Part 2 of this story I’ll talk about this skill and what I learned while building it.
Update: I have since started using the test events in Lambda and this has made life a little easier.
In my story titled “Just the Facts, Alexa” I talked about my first experience building apps for the Amazon Echo. (If…medium.com