get last uploaded directory backup
    :param aws_access_key_id:
    :param aws_secret_access_key:
    :param bucket_name:
    :param s3_folder:
    :param zip_backups_dir:
    :param project:
    :return:

def s3_get_dir_backup(aws_access_key_id, aws_secret_access_key, bucket_name, s3_folder, zip_backups_dir, project):
    """
    get last uploaded directory backup
    :param aws_access_key_id:
    :param aws_secret_access_key:
    :param bucket_name:
    :param s3_folder:
    :param zip_backups_dir:
    :param project:
    :return:
    """

    matches = []
    pat = dir_zip_pat % project
    print('looking for pat "%s" in bucket %s' % (pat, bucket_name))
    bucket = s3_bucket(aws_access_key_id, aws_secret_access_key, bucket_name)
    bucketlist = bucket.list()
    for f in bucketlist:
        
        if re.search(pat + '$', f.name):
            print('%s matches' % f.name)
            bk_date = dt.strptime(f.name.replace(s3_folder + '/', '')[0:19], TIMESTAMP_FORMAT)
            matches.append({
                'key': f,
                'file': f.name,
                'date': bk_date
            })
    if matches:
        last_bk = sorted(matches, key=operator.itemgetter('date'))[0]
        dest = os.path.join(zip_backups_dir, last_bk['file'].replace(s3_folder + '/', ''))
        if not os.path.exists(dest):
            last_bk['key'].get_contents_to_filename(dest)
            print('Downloaded %s to %s' % (f.name, dest))
        else:
            print('Last backup %s already exists' % dest)
    else:
        print('no matches')