lambda-handler-tester
v0.0.19
Published
A command line tool to test AWS Lambda handler local
Downloads
771
Maintainers
Readme
lambda-handler-tester
Test AWS Lambda handler built with javascript on the command line. This tool loads the javascript and call the handler function with the provided event data. Handler which can handler streaming are supported when using the flag
-s
.
Usage
Usage: pnpm dlx lambda-handler-tester [options]
Options:
-V, --version output the version number
--handler [PATH] path to request handler
-s, --streaming streaming handler (default: false)
-e, --event [PATH] path to an json file with a valid event
-c, --context [PATH] path to an json file with a valid context
-p, --path [PATH] path to request (default: "/")
--decode-base64 decode base64 body (default: false)
--header only show header without body (default: false)
-v, --verbose enables verbose logging (default: false)
--response-time measure the response time (default: false)
--repeat <number> repeat request [n] times (default: 1)
--silent no output (default: false)
-d, --debug enables verbose logging (default: false)
-h, --help display help for command
Examples:
$ pnpm dlx lambda-handler-tester
0.0.xx-development
Framework detection
These frameworks are detected:
If your network is not detected you will need to provide the path to the file with the AWS Lambda Handler:
$ pnpm dlx lambda-handler-tester --handler ./aws-lambda-output/handler.mjs