Sample project to test AWS Lambda functions written in Go with LocalStack
- Clone this repository
- Install Docker
- Install Docker Compose
- Run
docker-compose up
to setup LocalStack
- Compile and install with
make install
. - If you do some changes,
make
should compile, build and deploy.
aws --endpoint-url http://localhost:4566 lambda invoke \
--function-name sample-lambda \
--payload '{"firstname": "foo", "lastname": "bar", "age": 41}' \
output
Should produce an output with contents:
"{\"name\":\"foo bar\",\"age\":41}"