uw-oris-sns-messenger
v0.2.0
Published
Provides easy to use interface for sending messages to a configured SNS topic. Requires that environment variables be set for controlling the URL endpoints of target topics.
Readme
SNS Topic Messenger
Provides easy to use interface for sending messages to a configured SNS topic from Node.js applications.
Installation
To make use of this library, install via NPM using:
#!
npm install uw-oris-sns-messengerRequired Environment Variable
For this library to function correctly, an environment variable needs to be present:
AWS_DEFAULT_REGION
Contains the name of the region in which the messenger will attempt to find SNS topics when publishing messages. This environment variable is set automatically to the current region by the AWS Lambda Node runtime but needs to be set manually for other environments. For example, the Oregon region could be specific with the value "us-west-2".
Tests
All tests can be found in files ending in ".spec.js".
After retrieving this repository, install all dependencies using:
#!
npm installTo run tests:
#!
npm testTo run tests with code coverage results:
#!
npm run test-coverage