odc-stac icon indicating copy to clipboard operation
odc-stac copied to clipboard

Using `configure_s3_access` and `configure_rio` still requires setting the `AWS_NO_SIGN_REQUEST` environment variable

Open alexgleith opened this issue 1 year ago • 2 comments

I expect either of odc.stac.configure_s3_access(aws_unsigned=True) or configure_rio(cloud_defaults=True, aws=dict(aws_unsigned=True)) to set up the environment so that I don't need AWS credentials for public read S3 objects.

In testing, neither of those functions works, and loading data from S3 URIs throws the error:

RasterioIOError: AWS_SECRET_ACCESS_KEY and AWS_NO_SIGN_REQUEST configuration options not defined, and /Users/username/.aws/credentials not filled

If I do:

import os
os.environ["AWS_NO_SIGN_REQUEST"] = "YES"

then the error goes away, and data can be loaded.

Versions:

  • rasterio==1.3.10
  • odc-stac==0.3.9

I tried with and without Dask and both failed the same way.

alexgleith avatar Jun 24 '24 23:06 alexgleith

@alexgleith needs more info, in particular version of rasterio, version of odc-stac, whether this is a problem for dask, non-dask or both. There has been a handful of times in the past in rasterio that AWSSession had issues around that.

Kirill888 avatar Jun 25 '24 00:06 Kirill888

this one worth checking out for example:

https://github.com/rasterio/rasterio/issues/2866

Kirill888 avatar Jun 25 '24 00:06 Kirill888