A Simple Notification System Transport for winston (

npm install winston-sns
2 downloads in the last day
13 downloads in the last week
134 downloads in the last month

An Amazon SNS transport for winston.


Installing winston-sns via npm

  $ npm install winston
  $ npm install winston-sns

(or add it to your package.json)


  var winston = require('winston');

  // Requiring `winston-mail` will expose 
  // `winston.transports.SNS`

  winston.add(winston.transports.SNS, options);


Annotated source can be generated using docco:

    docco lib

note that you need pygments installed to use docco - you can install it on a mac by using:

  easy_install pygments

The SNS transport uses awssum to generate amazon sns messages.

  • aws_key: Your Amazon Web Services Key. [required]
  • aws_secret: Your Amazon Web Services Secret. [required]
  • subscriber: Subscriber number - found in your SNS AWS Console, after clicking on a topic. Same as AWS Account ID. [required]
  • topic_arn: Also found in SNS AWS Console - listed under a topic as Topic ARN. [required]
  • region: AWS Region to use. Can be one of: us-east-1,us-west-1,eu-west-1,ap-southeast-1,ap-northeast-1,us-gov-west-1,sa-east-1. (default: us-east-1)
  • subject: Subject for notifications. (default: "Winston Error Report")
  • message: Message of notifications. Uses placeholders for level (%l), error message (%e), and metadata (%m). (default: "Level '%l' Error:\n%e\n\nMetadata:\n%m")
  • level: lowest level this transport will log. (default: info)
  • handleExceptions: set to true to have this transport handle exceptions. (default: false)

Feel free to file issues in this github tracker, I check it often.

npm loves you