Skip to content

Tolerate 403 HTTP codes in S3 stores as "non existing" objects #3617

@jordi-domingo

Description

@jordi-domingo

Dear all,

I have a request for Zarr-Python related to their S3 stores (fsspec, obstore).

Under certain circumstances, accessing a Zarr datacube in S3 can lead to 403 responses, which is an expected and correct behaviour:

  1. During the creation of the datacube, chunk files with no data are directly not created (instead of left "empty").
  2. S3 access is restricted (with or without credentials), and user does no have ListObjects permissions.

For these cases, S3 returns 403 instead of 404 (which is correct). However, Zarr-Python fails with PermissionError.

When the user credentials have ListObjects permissions and S3 returns 404, Zarr-Python tolerates fine these non-exisitng chunks and the call (open_zarr or whatever) works well.

I suggest tolerating 403 responses in S3 stores in the same way 404 are.

Please, forgive me if this is not the right place to request this and it belong more to fsspec or obstore repos.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions