I started from a sam init
using Ruby 2.7. Run sam deploy --guided
and provide a phone number (you may get texted to confirm your subscription), latitude, and longitude. These are passed in to the weather.gov APIs, and this particular app focuses on wind. Of course, you can modify the handler logic to alarm on whatever you happen to care about (the APIs are public, easy to run curl
on them to explore what they return. If you are going to put this in a repo somewhere, you may also want to add samconfig.toml
to your .gitignore
so as to not broadcast your phone number, latitude, or longitude to the world.
In the future, I may enhance this to run on an hourly basis to collect "should notify" status overnight to be sent out in the morning, or to avoid re-texting the same adverse notification each hour on a high wind day. For that I might use something like AWS SSM (as a sort of cache of values like "when did I last send a text" or "has there been an adverse weather threshold since the last text notificat