aws-text-message
v0.0.0
Published
A wrapper for AWS SNS delivery of text messages
Downloads
2
Readme
AWS Text Message
Usage
- Install the package
npm i aws-text-message
- 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"
}
- 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