def get_files(resource, bucket_name, prefix=''):
    """List only files inside a bucket (DIR excluded)."""
    files = []
    bucket = resource.Bucket(bucket_name)
    for file_ in bucket.objects.filter(Prefix=prefix):
        files.append(file_)
    return files
