express-aws-sns
v0.4.0
Published
Middleware for parsing Amazon AWS SNS requests in express.
Downloads
2,462
Readme
AWS SNS Express middleware
This has been adapted from https://github.com/mattrobenolt/node-snsclient to better support express. If you just want a standalone client without express you're better off using that one.
Installation
$ npm install express-aws-sns
Usage
var express = require('express'),
sns = require('express-aws-sns'),
app = express();
app.use(sns());
Perform no verification (not recommended except for debugging):
app.use(sns({
verify: false
}));
Ensure topic:
app.use(sns({
topic: 'aws:sns:arn:xxx:yyy:zzz'
}));
By default, the message will be attached to the request in the snsMessage
property. It can be accessed via req.snsMessage
.