bbc/aws-lambda-runner

Name: aws-lambda-runner

Owner: BBC

Description: null

Created: 2015-07-02 13:53:09.0

Updated: 2018-04-23 16:25:29.0

Pushed: 2018-04-23 16:25:27.0

Homepage: null

Size: 68

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

AWS Lambda Runner

Runs Lambda deployables locally, usually to test them off-line.

License

This is licensed under the Apache 2.0 License

Example usage
rtest = LambdaRunner::Runner.new(File.expand_path('../path/to/handler.js', __FILE__), 'handler')

rtest.start

rtest.process_event LambdaRunner::Events.s3_event('some-bucket', 'some-key', 'file-path-to-actual-content')
rtest.process_event LambdaRunner::Events.sns_event('arn:::topic_name', 'message_uuid', '2015-04-02T07:36:57.451Z', 'message body')

rtest.stop

This will start a running the lambda deployable, then send two notifications to it, firstly a s3 trigger and secondly a sns trigger, In each case, it will block until either the function completes, times out or fails in an other way.

Caveats & Known Issues

For a node.js deployment, you have to have done a npm install in your handler's directory if you are using any external libraries.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.