INNER CODE UNIT · Python

send_org_alert

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

def send_org_alert(
    event_details, affected_org_accounts, affected_org_entities, event_type
):
    slack_url = get_secrets()["slack"]
    teams_url = get_secrets()["teams"]
    chime_url = get_secrets()["chime"]
    SENDER = os.environ["FROM_EMAIL"]
    RECIPIENT = os.environ["TO_EMAIL"]
    event_bus_name = get_secrets()["eventbusname"]

    # get the list of resources from the array of affected entities
    resources = get_resources_from_entities(affected_org_entities)

    if "None" not in event_bus_name:
        try:
            print("Sending the org alert to Event Bridge")
            send_to_eventbridge(
                get_detail_for_eventbridge(event_details, affected_org_entities),

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…