s3fs: Can't list buckets
I have some AWS credentials for which I can’t list buckets. I almost never have bucket level permissions, but I do have permissions on prefixes. So something like
fs = s3fs.S3FileSystem(profile_name='user')
fs.ls('s3://home/sseabold/prefix')
Won’t work because I can’t list any buckets (S3Client.list_buckets fails), and I also don’t generally have permissions at the bucket level.
Similar issues to those here [1, 2] for the default (old) boto behavior.
[1] https://github.com/conda/conda/pull/2126 [2] https://github.com/blaze/odo/pull/448
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 19 (7 by maintainers)
Yes agreed, we should check in ls(‘’) first, and if not found, try ls(bucket) - if it succeeds, the bucket exists.
https://github.com/dask/s3fs/blob/bfd5de29270a0063935889ce089f84b3f803012b/s3fs/core.py#L791 Would it make more sense to change to
self.ls(bucket)in this line? Some credentials have limited ACL to see other buckets.Your help in identifying issues is totally appreciated, no apology required!