ome-zarr-py
ome-zarr-py copied to clipboard
Read from public S3 URI without credentials
Problem
No credentials are required to read from a public S3 bucket. However, ome-zarr-py requires credentials when using an s3:// url. https:// urls do not face this issue.
Example (run without any AWS credentials configured):
from ome_zarr.io import parse_url
from ome_zarr.reader import Reader
url = (
"s3://allencell/aics/nuc_morph_data"
"/data_for_analysis/baseline_colonies/20200323_09_small/raw.ome.zarr"
)
reader = Reader(parse_url(url)) # Logs "botocore.exceptions.NoCredentialsError: Unable to locate credentials" and raises AttributeError
Possible fixes
The core of the issue is that s3fs requires the anon=True parameter to use a public bucket without credentials.
- #349 would resolve this, since the user can create their own FSSpec instance with
anon=True - Another option would be to accept a
kwargsargument toReader.__init__that gets passed along to FSSpec