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

Latest commit

 

History

History

aws-golang-net

Serverless AWS Golang Net

Serverless AWS Go Net example using:

All CRUD operations are within a single Lambda Function behind gorilla/mux. This example is very handy for porting over existing golang/net projects. However it is not readily compatible with 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-net -n your-app
cd you-app
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