https://github.com/njuettner/go-alexa
Build Alexa Skills in Go using AWS Lambda. Helps you with Alexa requests and responses.
https://github.com/njuettner/go-alexa
alexa alexa-skill alexa-skills-kit aws aws-lambda go golang handler
Last synced: 8 months ago
JSON representation
Build Alexa Skills in Go using AWS Lambda. Helps you with Alexa requests and responses.
- Host: GitHub
- URL: https://github.com/njuettner/go-alexa
- Owner: njuettner
- License: mit
- Created: 2018-03-16T11:53:36.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-02-19T13:58:48.000Z (over 5 years ago)
- Last Synced: 2024-06-20T11:46:40.344Z (over 1 year ago)
- Topics: alexa, alexa-skill, alexa-skills-kit, aws, aws-lambda, go, golang, handler
- Language: Go
- Homepage:
- Size: 194 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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:::role/ \
--runtime go1.x \
--zip-file fileb://deployment.zip \
--handler lambda_handler
```Verify if your function was uploaded:

1. Open your function you've uploaded
2. Add trigger **"Alexa Skills Kit"**

3. Add the Alexa Skill ID from [**Amazon Developer Console**](https://developer.amazon.com)
4. Save your changesBesides that, of course you need to add and configure the Alexa Skill in the [**Amazon Developer Console**](https://developer.amazon.com).