This is actually a plain Node.js Writable object stream so could be used without bunyan.
var bunyan = ;var createCWStream = ;var stream =;var log = bunyan;
To avoid raising exceptions when stringifying circular object logs, install the optional dependency 'safe-json-stringify'.
Avoid logging from multiple sources to the same CloudWatch log stream. The module has a fallback by requesting the latest log sequence but this can result in a major performance decrease due to additional requests. It is recommended to e.g. add the machines IP address to the log stream name when logging from multiple instances.
cloudWatchLogsOptions(optional): options passed to the
On write of the first log, the module creates the logGroup and logStream if necessary.
We use the aws-sdk to write the logs - the AWS credentials have therefore to be configured using environment variables (
This project was created by Mirko Kiefer (@mirkokiefer).