diff --git a/functions.tf b/functions.tf index cf3bbdb2201c676462598fb02905f664d782e320..9a2613d76b94bace2a18fa8fe75d873ee73b3fa9 100644 --- a/functions.tf +++ b/functions.tf @@ -12,6 +12,7 @@ locals { "myip", "kodi", "transmission", + "vouch", ] function_names = [for name in local.functions : "${local.function_name_prefix}-${replace(name, "_", "")}"] } diff --git a/src/vouch.py b/src/vouch.py new file mode 100644 index 0000000000000000000000000000000000000000..3a82a4f6b8674a2d3cf349b9b2947b330c7aaf30 --- /dev/null +++ b/src/vouch.py @@ -0,0 +1,14 @@ +from utils import check_urls + + +def handler(event, context): # pylint: disable=unused-argument + """Lambda event handler.""" + checks = [ + {"url": "http://vouch.shore.co.il/", "codes": [301, 302]}, + {"url": "https://vouch.shore.co.il/validate", "codes": [401]}, + ] + check_urls(checks) + + +if __name__ == "__main__": + handler("event", "context")