INNER CODE UNIT · Python

send_alert

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

def send_alert(event_details, affected_accounts, affected_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_entities)

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

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…