Skip to content

Commit

Permalink
Added Amazon DynamoDB transport instructions and link.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffreypriebe committed Jun 13, 2015
1 parent 7f75b48 commit b575e7b
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -842,6 +842,35 @@ The Mail transport uses [emailjs](https://github.com/eleith/emailjs) behind the

*Metadata:* Stringified as JSON in email.

### Amazon DynamoDB Transport
The [winston-dynamodb][26] transport uses Amazon's DynamoDB as a sink for log messages. You can take advantage of the various authentication methods supports by Amazon's aws-sdk module. See [Configuring the SDK in Node.js](http://docs.aws.amazon.com/AWSJavaScriptSDK/guide/node-configuring.html).

``` js
var winston = require('winston'),
winstonDynamo = require("winston-dynamodb");

winstonDynamo.DynamoDB;
winston.add(winston.transports.DynamoDB, options)
```

Options:
* __accessKeyId:__ your AWS access key id
* __secretAccessKey:__ your AWS secret access key
* __region:__ the region where the domain is hosted
* __useEnvironment:__ use process.env values for AWS access, secret, & region.
* __tableName:__ DynamoDB table name

To Configure using environment authentication:
``` js
var options = {
useEnvironment: true,
tableName: 'log'
};
winston.add(winston.transports.DynamoDB, options);
```

Also supports callbacks for completion when the DynamoDB putItem has been compelted.

### Amazon SNS (Simple Notification System) Transport

The [winston-sns][25] transport uses amazon SNS to send emails, texts, or a bunch of other notifications. Since this transport uses the Amazon AWS SDK for JavaScript, you can take advantage of the various methods of authentication found in Amazon's [Configuring the SDK in Node.js](http://docs.aws.amazon.com/AWSJavaScriptSDK/guide/node-configuring.html) document.
Expand Down Expand Up @@ -1040,3 +1069,4 @@ All of the winston tests are written in [vows][9], and designed to be run with n
[23]: https://github.com/kenperkins/winston-papertrail
[24]: https://github.com/jorgebay/winston-cassandra
[25]: https://github.com/jesseditson/winston-sns
[26]: https://github.com/inspiredjw/winston-dynamodb/

0 comments on commit b575e7b

Please sign in to comment.