1.0.2 • Published 6 years ago

@soliveira/sns-publisher v1.0.2

Weekly downloads
1
License
ISC
Repository
github
Last release
6 years ago

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)