A tool to help developer work with AWS Lambda. The tool helps make things more:
- Discoverable: To help you understand what code is out there and what it does.
- Transparent: To help you understand our running systems. What are they doing? Are they working? If there are issues, what is causing them.
$ npm install --global lambee-cli
This program uses the following environment variables:
- AWS_PROFILE
- AWS_DEFAULT_REGION
$ lambee fn-list --help
Usage: fn-list [options]
Prints a list of our Lambda functions.
Options:
--context <context> Only show functions belonging to this bounded context. (This feature is not yet implemented. It is a concept from Domain Driven Design which we should think about.)
--debug Enable debug logging
-h, --help output usage information
$ lambee fn-logs --help
Usage: fn-logs [options] <functionName>
Prints nice clean logs for a Lambda function.
Options:
--verbose Print all log messages. Don't filter our START, END and REPORT messages.
--debug Enable debug logging
-h, --help output usage information
To get nicely formatted logs you should write the logging statements in your functions something like this:
console.error("Description of the error", error);
console.info("Something interesting happened", JSON.stringify(details, undefined, 4));
process.env.DEBUG_LOGGING && console.debug("Something interesting happened", JSON.stringify(details, undefined, 4));
- logs - Log files are part of system transparency. We don't want to have the situation where the system breaks and we don't know what the heck made it fall over. When the system breaks we want to be able to look into the inner workings of the program and find the root cause ASAP.
- functions list - See a list of our Lambda functions.
- functions invoke - Ability to invoke a Lambda function from the cli.
- functions info - See the README file for a Lambda function so that you can discover what it does.
- functions create - Help people create a new Lambda function using a template. Template will just be a git repo.