- Install Gordon. I chose Gordon because it seemed to be the simplest and sharpest tool for working with AWS Lambda, and so far I've been pretty impressed.
- Install Docker (for running DynamoDB locally)
- I think you need to make sure that you've got AWS credentials setup in
$HOME/.aws
(instructions here)
There's a good chance I'm forgetting something here, so if you have any problems please don't hesitate to let me know.
./bin/start-dynamodb
./bin/run-unit-tests
./bin/stop-dynamodb
T_STAGE=prod ./bin/create-table
./bin/do-deploy
After you deploy, Gordon will spit back a set of outputs like:
Project Outputs:
ApigatewayHelloworldapi
https://rgx1pkb8se.execute-api.us-west-2.amazonaws.com/dev
T_STAGE=prod ./bin/run-integration-tests
T_STAGE=prod ./bin/delete-table
So I've included a little dummy script that will just send a status (-1, 0, 1) to the backend once a second.
./bin/start-fake-pi
T_STAGE=prod ./bin/start-fake-pi
./bin/scan-table