While Go is still not an officially supported language on Amazon Lambda, there are several ways to make it work:
- Lambda_proc - Node.js wrapper for your go binary
- GopherJS - Cross-Compile your Go code to NodeJS
- eawsy Lamba Go Shim - Python shim for your go binary
In my previous project where I built a screen scraper in Go and deployed it to Lambda, I utilized Lambda_proc. This does work pretty well an is a solid solution.
The eawsy team released their new tool earlier this year and it seems to be the cleanest approach. The overhead between the Python shim and your Go code is clean and fast. They utilize a Docker container to build the necessary bridges from Python to Go, resulting in very fast execution. You can write log messages to the Lambda console using log.Printf. And it is FAST. The HelloWorld skill runs in sub-millisecond times!
Take a look at the alexa-skills-kit-golang project for usage and samples, and give the eawsy Lamba Go Shim a try for your next Go project on Amazon AWS Lambda.
- Updated 3/4/2017 - updated run time based on newer stable eawsy shim speeds.