INNER CODE UNIT · Python

time_delta

aws-samples/aws-health-aware · handler.py:756

    time_delta = datetime.now() - timedelta(hours=delta_hours)
    print("Searching for events and updates made after: ", time_delta)
    dict_regions = os.environ["REGIONS"]

    str_filter = {"lastUpdatedTimes": [{"from": time_delta}]}

    if health_event_type == "issue":
        event_type_filter = {"eventTypeCategories": ["issue", "investigation"]}
        print(
            "AHA will be monitoring events with event type categories as 'issue' only!"
        )
        str_filter.update(event_type_filter)

    if dict_regions != "all regions":
        dict_regions = [region.strip() for region in dict_regions.split(",")]
        print(
            "AHA will monitor for events only in the selected regions: ", dict_regions
        )

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…