Heroku-like experience with AWS Lambdas.
heroku git:remote)$ lambdoku init <ARN-of-your-lambda-function>
this allows you to omit the -a param for all commands below
$ lambdoku push hello.zip
heroku config)$ lambdoku config:set ONE=1 TWO=2
$ lambdoku config
ONE='1'
TWO='2'
$ lambdoku config:get ONE
ONE='1'
heroku releases)$ lambdoku releases
22 | Setting env variables AA | 2016-11-26T21:12:46.894+0000
21 | Unsetting env variables XY | 2016-11-26T21:10:04.302+0000
20 | Setting env variables BB,XY | 2016-11-26T20:57:57.340+0000
...
$ lambdoku rollback 18
$ lambdoku releases
23 | Rolling back to version 18 | 2016-11-26T21:35:45.952+0000
22 | Setting env variables AA | 2016-11-26T21:12:46.894+0000
21 | Unsetting env variables XY | 2016-11-26T21:10:04.302+0000
20 | Setting env variables BB,XY | 2016-11-26T20:57:57.340+0000
...
in the example ☝️ both code and configuration is rolled back from version 18.
heroku pipelines)(actually the main reason why lambdoku was created)
$ lambdoku init lambdaDev
$ lambdoku pipeline:add lambdaStage
$ lambdoku pipeline:add lambdaProd -a lambdaStage
$ lambdoku pipeline
lambdaStage
$ lambdoku pipeline:promote
now lambdaDev and lambdaStage have the same codebase.
lambdaStage can be promoted to lambdaProd with command lambdoku downstream:promote -a lambdaStage.
To get 100 latest log lines from all lambda invocations:
$ lambdoku logs -n 100
To follow logs produced by all lambda invocations:
$ lambdoku logs -f
To invoke lambda to test if it works, you can use:
lambdoku invoke
You can also pass parameters to the function invocation:
lambdoku invoke '{"param1": "value1" ... }'
Prerequisite: AWS Environment variables
AWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEYAWS_DEFAULT_REGION~/.aws/config file to configure aws-sdk by setting AWS_SDK_LOAD_CONFIG env variable to something truthyPrerequisite: Node and npm (ES6 support required)
brew update && brew install nodeThen, simply:
npm install -g lambdoku
aws-sdkrollback and promote operations retrieve code from AWS and uploads it in place of current oneDOWNSTREAM_LAMBDAS to the dowstreamsDue to the nature of AWS Lambda API most of the operations can't be considered atomic, like:
4,329 followers · starred Nov 2016
1,243 followers · starred Nov 2016
24,677 followers · starred Dec 2016
1,455 followers · starred Nov 2016
Heroku-like experience with AWS Lambdas.
heroku git:remote)$ lambdoku init <ARN-of-your-lambda-function>
this allows you to omit the -a param for all commands below
$ lambdoku push hello.zip
heroku config)$ lambdoku config:set ONE=1 TWO=2
$ lambdoku config
ONE='1'
TWO='2'
$ lambdoku config:get ONE
ONE='1'
heroku releases)$ lambdoku releases
22 | Setting env variables AA | 2016-11-26T21:12:46.894+0000
21 | Unsetting env variables XY | 2016-11-26T21:10:04.302+0000
20 | Setting env variables BB,XY | 2016-11-26T20:57:57.340+0000
...
$ lambdoku rollback 18
$ lambdoku releases
23 | Rolling back to version 18 | 2016-11-26T21:35:45.952+0000
22 | Setting env variables AA | 2016-11-26T21:12:46.894+0000
21 | Unsetting env variables XY | 2016-11-26T21:10:04.302+0000
20 | Setting env variables BB,XY | 2016-11-26T20:57:57.340+0000
...
in the example ☝️ both code and configuration is rolled back from version 18.
heroku pipelines)(actually the main reason why lambdoku was created)
$ lambdoku init lambdaDev
$ lambdoku pipeline:add lambdaStage
$ lambdoku pipeline:add lambdaProd -a lambdaStage
$ lambdoku pipeline
lambdaStage
$ lambdoku pipeline:promote
now lambdaDev and lambdaStage have the same codebase.
lambdaStage can be promoted to lambdaProd with command lambdoku downstream:promote -a lambdaStage.
To get 100 latest log lines from all lambda invocations:
$ lambdoku logs -n 100
To follow logs produced by all lambda invocations:
$ lambdoku logs -f
To invoke lambda to test if it works, you can use:
lambdoku invoke
You can also pass parameters to the function invocation:
lambdoku invoke '{"param1": "value1" ... }'
Prerequisite: AWS Environment variables
AWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEYAWS_DEFAULT_REGION~/.aws/config file to configure aws-sdk by setting AWS_SDK_LOAD_CONFIG env variable to something truthyPrerequisite: Node and npm (ES6 support required)
brew update && brew install nodeThen, simply:
npm install -g lambdoku
aws-sdkrollback and promote operations retrieve code from AWS and uploads it in place of current oneDOWNSTREAM_LAMBDAS to the dowstreamsDue to the nature of AWS Lambda API most of the operations can't be considered atomic, like:
4,329 followers · starred Nov 2016
1,243 followers · starred Nov 2016
24,677 followers · starred Dec 2016
1,455 followers · starred Nov 2016