1.0.2 • Published 6 years ago
@soliveira/sns-publisher v1.0.2
Installation
npm install @soliveira/sns-publisher
Usage
Require the module
const AWS = require('aws-sdk')
const sns = AWS.SNS()
const snsPublisher = require('sns-publisher')(sns)
const topicArn = 'arn:aws:sns:region:account-id:topicname'
Simple usage
const message = 'Hello'
snsPublisher.publish(topicArn, message)
With messageAttributes
const message = 'Hello'
const messageAttributes = { store: 'example_corp' }
snsPublisher.publish(topicArn, message, messageAttributes)