@soliveira/sns-publisher

1.0.2 • Public • Published

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)

Readme

Keywords

Package Sidebar

Install

npm i @soliveira/sns-publisher

Weekly Downloads

1

Version

1.0.2

License

ISC

Unpacked Size

1.99 kB

Total Files

5

Last publish

Collaborators

  • soliveira