cvmartin
11/16/2017 - 12:59 PM

Using AWS simple notification service

Draft of how to use Amazon notification services

library(aws.sns)

Sys.setenv("AWS_ACCESS_KEY_ID" = ,
           "AWS_SECRET_ACCESS_KEY" = ,
           "AWS_DEFAULT_REGION" = "eu-central-1")

topic <- create_topic(name = "TestTopic")
set_topic_attrs(topic, attribute = c(DisplayName = "Publicly visible topic name"))

subscribe(topic, "carlos@herobalancer.nl", protocol = "email")

publish(topic = topic, message = "The timestamp is stopped", subject = "Failure")

###

failstamp <- create_topic(name = "timestamp_spanbroek_failure")
set_topic_attrs(failstamp, attribute = c(DisplayName = "Failure in Spanbroek recording"))
# subscribe(failstamp, "sjoerd@herobalancer.nl", protocol = "email")


publish(topic = failstamp, message = "According with this test script, the timestamp of the data retrieved from kropman hasn't changed in the last hour, or consists just in NA's. 
        Perhaps something is wrong.",
        subject = "The timestamp has stopped")