<commit_before>docker-lambda
-------------

A sandboxed local environment that replicates the live [AWS Lambda](https://aws.amazon.com/lambda/)
environment almost identically – including installed software and libraries,
file structure and permissions, environment variables, context objects and
behaviors – even the user and running process are the same.

![Terminal Example](https://raw.githubusercontent.com/lambci/docker-lambda/master/examples/terminal.png "Example usage when index.js in current dir")

You can use it for testing your functions in the same strict Lambda environment,
knowing that they'll exhibit the same behavior when deployed live. You can
also use it to compile native dependencies knowing that you're linking to the
same library versions that exist on AWS Lambda and then deploy using
the [AWS CLI](https://aws.amazon.com/cli/).

This project consists of a set of Docker images for each of the supported Lambda runtimes
(Node.js 0.10 and 4.3, Python 2.7\* and Java 8\*) – as well as build
images that include packages like gcc-c++, git, zip and the aws-cli for
compiling and deploying.

There's also an npm module to make it convenient to invoke from Node.js

\* NB: The Java 8 test runner is not yet complete, but the
language is installed in the images so can be manually tested

Prerequisites
-------------

You'll need [Docker](https://www.docker.com) installed

Example
-------

You can run your Lambdas from local directories using the `-v` arg with
`docker run` – logging goes to stderr and the callback result goes to stdout:<commit_msg>No need to asterisk Python 2.7 anymore<commit_after>docker-lambda
-------------

A sandboxed local environment that replicates the live [AWS Lambda](https://aws.amazon.com/lambda/)
environment almost identically – including installed software and libraries,
file structure and permissions, environment variables, context objects and
behaviors – even the user and running process are the same.

![Terminal Example](https://raw.githubusercontent.com/lambci/docker-lambda/master/examples/terminal.png "Example usage when index.js in current dir")

You can use it for testing your functions in the same strict Lambda environment,
knowing that they'll exhibit the same behavior when deployed live. You can
also use it to compile native dependencies knowing that you're linking to the
same library versions that exist on AWS Lambda and then deploy using
the [AWS CLI](https://aws.amazon.com/cli/).

This project consists of a set of Docker images for each of the supported Lambda runtimes
(Node.js 0.10 and 4.3, Python 2.7 and Java 8\*) – as well as build
images that include packages like gcc-c++, git, zip and the aws-cli for
compiling and deploying.

There's also an npm module to make it convenient to invoke from Node.js

\* NB: The Java 8 test runner is not yet complete, but the
language is installed in the images so can be manually tested

Prerequisites
-------------

You'll need [Docker](https://www.docker.com) installed

Example
-------

You can run your Lambdas from local directories using the `-v` arg with
`docker run` – logging goes to stderr and the callback result goes to stdout:
{'fraction_non_alphanumeric': 0.08309636650868879, 'fraction_numerical': 0.00631911532385466, 'mean_word_length': 4.098228663446055, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 8, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6356621', 'n_tokens_mistral': 855, 'n_tokens_neox': 794, 'n_words': 439}