Skip to content

Build Alexa Skills in Go using AWS Lambda. Helps you with Alexa requests and responses.

License

Notifications You must be signed in to change notification settings

njuettner/go-alexa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Alexa Skills in Go using AWS Lambda

How it works

See example/main.go

How to upload your code to AWS using Lambda

Build a binary that runs on Linux and zip it up into a deployment package.

$ GOOS=linux go build -o lambda_handler main.go
$ zip deployment.zip lambda_handler

Assuming you have already installed aws-cli:

NOTE:
function-name: name which handles the requests (in our example it is alexaDispatchIntentHandler)
handler: name of the binary file (here it is lambda_handler)
region: in order to run Alexa Skills with AWS Lambda you need to choose us-west-1, us-east-1 or eu-west-1

$ aws lambda create-function \
  --region eu-west-1 \
  --function-name alexaDispatchIntentHandler \
  --memory 128 \
  --role arn:aws:iam::<account-id>:role/<role> \
  --runtime go1.x \
  --zip-file fileb://deployment.zip \
  --handler lambda_handler

Verify if your function was uploaded:

Lambda

  1. Open your function you've uploaded
  2. Add trigger "Alexa Skills Kit" Alexa Skills Kit
  3. Add the Alexa Skill ID from Amazon Developer Console
  4. Save your changes

Besides that, of course you need to add and configure the Alexa Skill in the Amazon Developer Console.

About

Build Alexa Skills in Go using AWS Lambda. Helps you with Alexa requests and responses.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages