Skip to content

Latest commit

 

History

History
45 lines (32 loc) · 1.82 KB

README.md

File metadata and controls

45 lines (32 loc) · 1.82 KB

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 ..