Skip to content

Instantly share code, notes, and snippets.

@timbaileyjones
Created May 22, 2020 01:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timbaileyjones/54a1d84833dfc46a5cdea8ef131ede44 to your computer and use it in GitHub Desktop.
Save timbaileyjones/54a1d84833dfc46a5cdea8ef131ede44 to your computer and use it in GitHub Desktop.
'''
main entrypoint for invoking from a zip file:
python3 cloudwatch_dashboards.zip file-containing-cloudwatch-event.json
'''
import json
import os
import sys
from cloudwatch_dashboards.cloudwatch_dashboards import update_dashboards #<----
print("sys.argv", sys.argv)
if len(sys.argv) < 2:
print("Usage: cloudwatch_dashboards.py event.json")
sys.exit(1)
event = json.loads(open(sys.argv[1]).read())
update_dashboards(event) #<----
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment