INNER CODE UNIT · Python
get_resources_from_entities
aws-samples/aws-health-aware · handler.py:458
def get_resources_from_entities(affected_entity_array):
resources = []
for entity in affected_entity_array:
if entity["entityValue"] == "UNKNOWN":
# UNKNOWN indicates a public/non-accountspecific event, no resources
pass
elif (
entity["entityValue"] != "AWS_ACCOUNT"
and entity["entityValue"] != entity["awsAccountId"]
):
resources.append(entity["entityValue"])
return resources
# For Customers using AWS Organizations
def update_org_ddb(
event_arn,