Go programming on Lambda with Apex
Apex is a tool for building, deploying, and managing AWS Lambda functions. It provides wrappers for Go (using a Node.js
shim). Currently, there is not a way to run native Go code on Lambda without such a shim. This recipe will explore creating Go Lambda functions and deploying them with Apex.
Getting ready
Configure your environment according to these steps:
- Download and install Go on your operating system (https://golang.org/doc/install) and configure your
GOPATH
environment variable. - Open a terminal/console application.
- Navigate to your
GOPATH/src
directory and create a project directory, for example,$GOPATH/src/github.com/yourusername/customrepo
. All code will be run and modified from this directory. - Optionally, install the latest tested version of the code using the
go get github.com/agtorre/go-cookbook/...
command. - Install Apex from http://apex.run/.
- Run the
go get github.com/apex/go-apex
command.
How to do it...
These steps cover writing and running your application...