Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read from public S3 URI without credentials #369

Closed
pgarrison opened this issue Apr 17, 2024 · 0 comments
Closed

Read from public S3 URI without credentials #369

pgarrison opened this issue Apr 17, 2024 · 0 comments

Comments

@pgarrison
Copy link

pgarrison commented Apr 17, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant