0.0.0 • Published 5 years ago

aws-text-message v0.0.0

Weekly downloads
3
License
ISC
Repository
github
Last release
5 years ago

AWS Text Message

Usage

  1. Install the package
npm i aws-text-message
  1. Create a .json configuration file
{
  "region"         : "us-west-2",
  "accessKeyId"    : "XXXXXXXXXXXXXXXXXXXX",
  "secretAccessKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "snsTopicArn"    : "arn:aws:sns:us-west-2:XXXXXXXXXXXX:Example",
  "phoneNumber"    : "+1 555 123 4567"
}
  1. Require the module, specifying the .json config file
const SMS = require("aws-text-message")("aws-config.json");

SMS.Send("Hello world");

Methods

Send(message)

message: The message that will be sent to the phone number that was setup in the config file

ToDo

  • Allow the config file to be YAML in addition to JSON
  • Improve versatility of initializing and changing the properties