https://github.com/dougmoscrop/lamberjack
Ship CloudWatch Logs to Firehose!
https://github.com/dougmoscrop/lamberjack
aws kinesis-firehose lambda serverless
Last synced: about 1 year ago
JSON representation
Ship CloudWatch Logs to Firehose!
- Host: GitHub
- URL: https://github.com/dougmoscrop/lamberjack
- Owner: dougmoscrop
- Created: 2018-03-02T16:05:59.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-01T13:49:16.000Z (almost 8 years ago)
- Last Synced: 2024-04-29T17:22:53.260Z (almost 2 years ago)
- Topics: aws, kinesis-firehose, lambda, serverless
- Language: JavaScript
- Size: 255 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# lamberjack
Ship your CloudWatch logs to Firehose for centralized logging, etc.
## Usage
`lamberjack(event, options)`
This library comes with sensible defaults, the only option required is the deliveryStreamName.
```js
const lamberjack = require('lamberjack')
module.exports.handler = (event, context, callback) => {
lamberjack(event, { deliveryStreamName: 'test' })
.then(() => callback())
.catch(e => callback(e))
};
```
## Options
(as seen: default values)
```js
{
retry: {
delay: 200, // milliseconds, used exponentially in backoff
limit: 3 // number of retries
},
firehose: undefined // a custom firehose client to use
transform: undefined // try to parse the JSON record, or { message } if not parsable
}
```