Closed brianherman closed 3 years ago
The SMS get's send with twilio here:
The twilio block appears twice, I added one later for a shutdown notification. Should have turned it into a function but I was taking a shortcut.
I like the idea of adding SNS, that makes it a 100% AWS solution. I only used Twilio because I had the sending code already written for another project. I'll probably research this a bit and make it an option and build it into the container, maybe over the weekend. Or feel free to find/link example api commands or code.
Remember you can easily modify the watchdog.sh file and build your own container. I was originally hosting the container in a personal ECR repo and only put it up on docker hub to make it easier for anyone to use out of the box.
Using a aws only here does make sense.
One concern about SNS is the cost associated with sending actual text messages, as opposed to emailing phonenumber@carriergateway.com. In the AWS PinPoint console, in order to send SMS messages, you need to register an origination phone number as part of a 10DLC campaign, or register a toll free number, which would increase costs. I think publishing server ready/shutdown notifications to an SNS topic would be an easy add, but where people take it from there would be up to them.
Added code to cleanup notifications, optional SNS notification also added, including IAM policy to publish to a topic. It's up to the user to determine what to do with the messages coming into that topic, whether it be email, text message, or flashing a light in their house.
Oh wow thank you!
Maybe to make a end to end solution where you use amazon SNS instead of twilio. I would be willing to code this solution into this project. Maybe you could point me where the notification code is and we can make the option of using amazon sns instead if twilio?