Developing Amazon Alexa Skills
with the Go Programming
Language
Nic Raboy
Tracy Developer Meetup Organizer
The Agenda
The Agenda
• Getting Familiar with AWS Lambda
• Getting Familiar with the Alexa Developer Portal
• Understanding the Request and Response Format for Alexa
• Assigning Logic to Alexa Requests (Intents)
Something to Note
Amazon Web Services (AWS) is not a requirement, it is a convenience.
Amazon Alexa Skills
Alexa Powered Devices
What is an Alexa Skill?
Using Alexa Skills
• Alexa, ask Nest to set the thermostat to 75 degrees
• Alexa, ask Uber to request a ride
• Alexa, ask WebMD for the side effects of Methamphetamine
Alexa in Action
• Alexa performs a speech to text analysis
• Alexa recognizes the invocation word
○ Ex: Uber, Nest, WebMD, etc.
• Alexa associates the spoken command to an Intent
• The Intent information with optional parameters are sent to the API
Functions as a Service (FaaS) with AWS
Lambda
The AWS Lambda SDK for Golang
Hello World with AWS Lambda
Cross-Compiling and Bundling for Lambda
AWS Lambda Dashboard
The Alexa Developer Portal
Alexa Developer Dashboard
Alexa Invocation Name
• Not the same as the Skill name.
• Used to initiate Skill on an Alexa powered device.
○ Alexa, ask INVOCATION_NAME…
• Should be real words that can be easily pronounced.
• Should be unique to prevent Skill overlap.
Alexa Intents and Sample Utterances
• An Alexa Skill has numerous Intents.
• Intents are individual Skill commands or actions.
○ Ex: Get the current temperature.
○ Ex: Get the weekly forecast.
• Utterances are phrases to activate an Intent.
• The more utterances for an Intent, the less likely to be misunderstood.
• Alexa has reserved Intents for specific functionality.
○ Ex: Asking for help using the Skill
Sample Utterances for `AboutIntent`
Sample Utterances with Slot Variables
The Request and Response Format
Request Objects
Response Objects
Request and Response Objects
The Unofficial Alexa SDK for Golang
Handling the Request Intents
Hello World with Alexa
Hello Human with Alexa
Intent Dispatching of Alexa Requests
Reserved Alexa Intents
• HelpIntent
• StopIntent
• CancelIntent
• FallbackIntent
Reserved Alexa Intents
A Realistic Example
Slick Deals
Slick Deals RSS Feed
RSS XML Data Structure in Go
RSS XML Data Structure in Go
RSS XML Data Structure in Go
Queue the Demo
Closing Thoughts
Summary
• Amazon Web Services (AWS) is not a requirement, it is a convenience.
• Invocation names should be real words that are pronounceable with most accents.
• Sample utterances should exist for all possible requests.
• Functions should finish executing quickly.
Alexa Developer Promotions
https://developer.amazon.com/alexa-skills-kit/alexa-developer-skill-promotion
Slick Dealer for Slickdeals.net
https://github.com/nraboy/alexa-slick-dealer
Getting Help
• Alexa - developer.amazon.com/alexa
• Lambda - aws.amazon.com/lambda
• Twitter - @nraboy
• Blog - thepolyglotdeveloper.com
THANK YOU!

Developing Amazon Alexa Skills with the Go Programming Language