Bokoblin is an opinionated scaffolding generator for AWS Lambda functions. It bundles together a set of tools which facilitate fast development and deployment of Lambda functions by providing:
- flow
- jasmine
- webpack
- deployment scripts
- aws-cli tool
Install globally with either npm
npm install bokoblin -g
or Yarn
yarn global add bokoblin
To generate a new lambda function you need to specify its name and the indentifier of the IAM role which Amazon will assign to it.
bokoblin MyNewFunction arn:aws:iam::123456789123456:role/lambda_basic_execution
cd MyNewFunction
Then initialize your test suite with:
yarn test init
Develop your code in app/component.js
.
You get the following out of the box:
yarn flow
- carries out static type checking with flowyarn build
- builds the function intobuild/component.js
yarn test
- builds the function and runs jasmine specsyarn push
- build the function, runs specs, and pushes to Amazon AWS