def s3_isfile(filepath, bucket):
    """
    @doc: check a file for existence in an S3 bucket
    @args: filepath is a str
           bucket is a boto3.resource.Bucket object
    @return: boolean whether or not the file exists
    """
    if bucket is None:
        return False
    objs = list(bucket.objects.filter(Prefix=filepath))
    return len(objs) > 0 and objs[0].key == filepath
