SNS messages - Green-Biome-Institute/AWS GitHub Wiki

Go back to GBI AWS Wiki

There is a script in the code segment of this github that sends what are called "Simple Notification Service" Messages (link: https://github.com/Green-Biome-Institute/AWS/blob/master/runprogram_endinstance_withnotice.sh.

These can be used for a variety of purposes, but for us it would be most applicable in the context of sending SMS mesages (texts) to our phones when our analyses are done to prevent overspending. In order for this script to work, the GBI AWS account needs to be set up with a number to send the messages from.

To do this you'll need to set up an "origination number" at https://us-west-2.console.aws.amazon.com/pinpoint/home?region=us-west-2#/sms-account-settings/phoneNumbers

Next you'll "provision numbers in pinpoint", then "request a phone number", then select a toll-free number originating from the united states. This is the number that you will receive the SNS messages set up in the aforementioned script from telling you at your analyses have stopped running and that your EC2 instances are either being stopped or terminated!


Further information regarding this topic:

documentation for aws publish: https://awscli.amazonaws.com/v2/documentation/api/latest/reference/sns/publish.html

helpful stackoverflow question: https://stackoverflow.com/questions/50143315/using-aws-sns-to-send-sms

Go back to GBI AWS Wiki