def search_tag_share()

in lambda/snapshots_tool_utils.py [0:0]


def search_tag_share(response):
    # Takes a describe_db_cluster_snapshots response and searches for our shareAndCopy tag
    try:

        for tag in response['TagList']:

            if tag['Key'] == 'shareAndCopy' and tag['Value'] == 'YES':

                for tag2 in response['TagList']:

                    if tag2['Key'] == 'CreatedBy' and tag2['Value'] == 'Snapshot Tool for Aurora':

                        return True

    except Exception:
        return False

    return False