1.2.0-beta.3 • Published 6 years ago

chronos-kinesis-router v1.2.0-beta.3

Weekly downloads
3
License
ISC
Repository
github
Last release
6 years ago

Kinesis Router

This package taps into the Oceanus event stream. It works both in a local environment and a when pushed to an AWS Serverless environment. It has two primary features: the router and the filter.

The filter is part of the handler and is responsible for filtering out events that have not been generated by a task event as part of the Google-Regular program decorator.

The router calls an appropriate API endpoint in order to activate a Task Agent, based the output of the filter. It's responsible for collecting the data needed for each Task Agent before calling them.

For Local Use

Add a line to the oceanus-events array in the local-pantheon-config.hjson file the root directory of the Pantheon API repository. That line should be the relative path to this file. That will pipe Oceanus events to this handler.

Here is an example:

../chronos/packages/google/kinesis-router/handler:handler

Deploying to Dev

In order to deploy the Kinesis Router to Serverless, you'll need to generate a JWT token to authorize the API calls. Based on these instructions you can generate a JWT token using the following command:

aws lambda invoke --invocation-type "RequestResponse" --function-name "tekmor-v3-dev-createJwt" --region "us-west-2" --payload '{ "target": "okta", "id" : "{yourFirstName}.{yourLastName}@welocalize.com"' jwt.json