Skip to content

A utility to run lambda kinesis handlers locally on real data.

Notifications You must be signed in to change notification settings

kunhuangau/local-lambda-kinesis

 
 

Repository files navigation

Local Lambda Kinesis Runner Build Status

A python utility for testing lambda kinesis handlers locally using real data.

Use Case

You want to test your lambda handler locally on real data before deploying it. This utility reads from a kinesis stream, transforms the events and forwards them to your handler.

Alternatives

At the time of writing, AWS SAM supports running kinesis handlers locally on a custom event.

Usage

pip install local_lambda_kinesis lambda_kinesis -s <stream_name> -p <handler path>

Optional arguments:

  • -i <iterator type> - Set the shard iterator type, suppors LATEST and TRIM_HORIZON.
  • --shard-iterator - By default the handler runs on the first available shard in the stream. you can use a specific one.

Environment Variables:

The tool uses the default AWS CLI settings. To override them, set AWS_PROFILE and AWS_DEFAULT_REGION.

Developing

Testing is done using , and linting is done using and [mypy]( pytest --disable-warnings @mypy --ignore-missing-imports . @black --check -l 100 . @flake8 . --max-line-length=100

Contirbuting

Three main tools are used for development:

Contribution is always welcome. To contibute:

  • Fork the repository
  • Create a pull request
  • Make sure the tests pass if you're having issues with black, run make format-code or black -l 100 ..

About

A utility to run lambda kinesis handlers locally on real data.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 98.3%
  • Makefile 1.7%