Skip to content
This repository was archived by the owner on Jan 12, 2023. It is now read-only.

Files

Latest commit

1098512 · Dec 25, 2017

History

History

aws-golang-event

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Aug 27, 2017
Aug 27, 2017
Jun 1, 2017
Sep 17, 2017
Aug 28, 2017
Sep 17, 2017
Sep 17, 2017
Dec 25, 2017
Sep 10, 2017
Sep 17, 2017
Sep 10, 2017

README.md

Serverless AWS Golang Event

Serverless AWS APIGateway events example using:

Each CRUD operation is it's own Lambda Function. This is convenient to hook into other Event Source triggers such as Kinesis or SNS.

Usage

Setup and deploy a new project called your-app:

cd $GOPATH/src/your-path/
serverless install -u https://github.com/yunspace/serverless-golang/tree/master/examples/aws-golang-event -n your-app
cd 
make DOTENV=.env.example dotenv
  • fill in and correct any of the variables in .env
  • replace WORKDIR in .env with /go/src/your-path/your-app
make test build deploy

use curl, PostMan or any REST client and do a POST on the provided gateway endpoint:

{
  "id": "c576e9bc-548e-457d-b662-254ade7fc695",
  "message": "hello world"
}

should get the same payload back with status 200

make remove