localstack-sample-go-lambda

command module
v0.0.0-...-55acda0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 19, 2020 License: MIT Imports: 5 Imported by: 0

README

Sample Go AWS Lambda

Sample project to test AWS Lambda functions written in Go with LocalStack

Install

  • Clone this repository
  • Install Docker
  • Install Docker Compose
  • Run docker-compose up to setup LocalStack

Compile and deploy

  • Compile and install with make install.
  • If you do some changes, make should compile, build and deploy.

Invoking function

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}"

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL