Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bbc/aws-lambda-runner
https://github.com/bbc/aws-lambda-runner
gem media-services modav
Last synced: 15 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/bbc/aws-lambda-runner
- Owner: bbc
- License: apache-2.0
- Created: 2015-07-02T13:53:09.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-11-21T12:36:17.000Z (almost 6 years ago)
- Last Synced: 2024-10-18T08:39:52.107Z (about 1 month ago)
- Topics: gem, media-services, modav
- Language: JavaScript
- Size: 101 KB
- Stars: 15
- Watchers: 75
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
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
```ruby
undertest = LambdaRunner::Runner.new(File.expand_path('../path/to/handler.js', __FILE__), 'handler')undertest.start
undertest.process_event LambdaRunner::Events.s3_event('some-bucket', 'some-key', 'file-path-to-actual-content')
undertest.process_event LambdaRunner::Events.sns_event('arn:::topic_name', 'message_uuid', '2015-04-02T07:36:57.451Z', 'message body')undertest.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.
To run tests you will need a version of node supporting async/await (node > 7.10.1)