odc-stac
odc-stac copied to clipboard
Using `configure_s3_access` and `configure_rio` still requires setting the `AWS_NO_SIGN_REQUEST` environment variable
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.10odc-stac==0.3.9
I tried with and without Dask and both failed the same way.
@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.
this one worth checking out for example:
https://github.com/rasterio/rasterio/issues/2866