This terraform module forwards logs generated by services and tasks deployed via Layer0 to a Kinesis stream.
- Terraform v0.11.3
- Node.js v6.10
- node-lambda npm package v0.11.6
The node.js lambda function source code can be found with the /src
directory. The lambda function needs the following environment variables set:
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- AWS_REGION
- STREAM_AWS_ACCESS_KEY
- STREAM_AWS_SECRET_KEY
- STREAM_AWS_REGION
- KINESIS_STREAM_NAME
To run and test the lambda function locally, you can do so by running the following command after you've set the required environment variables:
// if it is the first time you've cloned the project
npm install
node-lambda run
This will execute the lambda locally and pass the contents of event.json
and context.json
to the lambda event handler as event and context arguments.