... as in Lambda + Go
This is a simple AWS Lambda template for Go to write serverless functions as a single binary.
Note: Still a work in progress
It uses AWS SAM to build and deploy the Lambda function.
- Clone this repository
git clone https://github.com/richardamare/lamgo.git
- Change directory to the cloned repository
cd lamgo # or whatever you named the directory
- Configure the AWS CLI
aws configure
- Configure the AWS SAM deployment
NOTE: Set the
sam deploy --guided
SAM configuration environment
todev
or edit the Makefile deployment - Deploy the Lambda function to AWS
make deploy
Run locally using:
go run cmd/api/main.go
Currently, there are just two endpoints for demonstration purposes:
/health
/hello?name=