Skip to main content

Test harness for AWS Lambda

Project description

Sets up and executes Python code in a method highly analogous to the Lambda runtime environment.

Current notable gaps include:

  • No support for runtime or memory limits

  • No support for intra-execution cgroup freeze/thaw

Other than these caveats, it should look and feel roughly like a real Lambda execution, including all the correct environment variables, data structures, and log messages.

Check out the page on GitHub for complete documentation.

Example

[user@host ~]$ invoke-lambda --path ~/lambdas/Exec_Command_Example/ --payload '{"command": "echo Hello, World"}'
<CREATE Id:3d57aea1ba1e421a9f071ba741a278cb>
<RUN Mode:event Handler:function.lambda_handler Suppress_init:0>
<RUNNING>
[INFO]  2016-12-07T00:38:29.752Z                Function module init() called
START RequestId: 3773e161-e0af-437e-aa95-cd6dea0e457e Version: $LATEST
[INFO]  2016-12-07T00:38:29.752Z        3773e161-e0af-437e-aa95-cd6dea0e457e    Running command: echo Hello, World
END: RequestId: 3773e161-e0af-437e-aa95-cd6dea0e457e
Hello, World

<TERMINATE Id:3d57aea1ba1e421a9f071ba741a278cb>

Usage

Bootstrap once, then invoke:

lambda bootstrap
lambda invoke --path /path/to/lambda/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

lambda_harness-1.0.0-py2-none-any.whl (11.6 kB view hashes)

Uploaded Python 2

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page