Skip to content

Commit b575e7b

Browse files
committed
Added Amazon DynamoDB transport instructions and link.
1 parent 7f75b48 commit b575e7b

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -842,6 +842,35 @@ The Mail transport uses [emailjs](https://github.com/eleith/emailjs) behind the
842842

843843
*Metadata:* Stringified as JSON in email.
844844

845+
### Amazon DynamoDB Transport
846+
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).
847+
848+
``` js
849+
var winston = require('winston'),
850+
winstonDynamo = require("winston-dynamodb");
851+
852+
winstonDynamo.DynamoDB;
853+
winston.add(winston.transports.DynamoDB, options)
854+
```
855+
856+
Options:
857+
* __accessKeyId:__ your AWS access key id
858+
* __secretAccessKey:__ your AWS secret access key
859+
* __region:__ the region where the domain is hosted
860+
* __useEnvironment:__ use process.env values for AWS access, secret, & region.
861+
* __tableName:__ DynamoDB table name
862+
863+
To Configure using environment authentication:
864+
``` js
865+
var options = {
866+
useEnvironment: true,
867+
tableName: 'log'
868+
};
869+
winston.add(winston.transports.DynamoDB, options);
870+
```
871+
872+
Also supports callbacks for completion when the DynamoDB putItem has been compelted.
873+
845874
### Amazon SNS (Simple Notification System) Transport
846875

847876
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.
@@ -1040,3 +1069,4 @@ All of the winston tests are written in [vows][9], and designed to be run with n
10401069
[23]: https://github.com/kenperkins/winston-papertrail
10411070
[24]: https://github.com/jorgebay/winston-cassandra
10421071
[25]: https://github.com/jesseditson/winston-sns
1072+
[26]: https://github.com/inspiredjw/winston-dynamodb/

0 commit comments

Comments
 (0)