Skip to content

Alexa skill git for go lang based applications

License

Notifications You must be signed in to change notification settings

patst/alexa-skills-kit-for-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

alexa-skills-kit-for-go: Create Amazon Alexa Go skills

GoDoc GoCard Build Status codecov License

This library is for building Amazon Alexa custom skills with Go. Unfortunately Amazon does only provide Alexa SDKs for building skills with Java and NodeJS.

Supported features:

There is a excellent API description what attributes must be included in responses and how to use the different interfaces in the AWS Request and Response JSON reference

Functionality

Amazon has an exhaustive description of the Alexa API including all the request and response objects. This library mapped the objects to structs and provides a way to interact with the Alexa Voice Service.

The connection is either via Web Service for self hosted custom skills or AWS Lambda Function for skill hosted at the AWS Lambda Function service. The second option is a easier deployment way because a developer has not to think about valid HTTPS certificates.

Examples

The examples show the usage of the library for different Alexa controllers. Every example resides in its own folder and does not reference other examples.

Usage:

  • Copy the Go file(s) from one of the examples folders (e.g. examples/helloworld/main.go) in a Go project
  • Run go get ./...
  • Run go build
  • Execute the binary!

The AWS Alexa skill setup is described in the original tutorials. The ApplicationID from the Alexa skill must be configured in the skill definition.

You need a HTTPS endpoint configured to run this skill or deploy the skill as a lambda method (coming soon).

Hello world

There is a hello world example which reimplemented the Amazon hello world example. You can see how to implement different Alexa intents and use a SessionEnded and LaunchRequest handler.

Hello world lambda

Same examples as 'hello world' but it can be deployed as Amazon Lambda expression.

If you are using windows like I am it may be tricky to build the zip file with the executable file. The AWS lambda library contains a tool called build-lambda-zip for building a .zip file with a executable binary. (See Building your function)

The Lambda Function can be deployed using the AWS CLI, AWS CloudFormation or the AWS Web console. For details see deploying Lambda Functions.

Hello buttons lambda

Example how to use the new Echo Gadget Buttons. The example is converted from the Amazon NodeJS Hello buttons tutorial.

The example deploys as a lambda function. The necessary steps to create the skill are described in the above tutorial.

Author

Patrick Steinig (@patst87)

Releases

No releases published

Packages

No packages published

Languages