Serverless AWS APIGateway events example using:
Inspired by https://github.com/pmuens/serverless-kinesis-streams
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-kinesis -n your-app
cd your-app
make DOTENV=.env.example dotenv
- create a new stream called
data-receiver
in AWS console - fill in and correct any of the variables in .env. Especially AWS_KINESIS_ARN
- replace
WORKDIR
in .env with/go/src/your-path/your-app
make test build deploy
Publish a message
make publish
Observe the logs to see data-receiver
stream triggering data-logger
make logger
make remove