xcube-dev / xcube

xcube is a Python package for generating and exploiting data cubes powered by xarray, dask, and zarr.
https://xcube.readthedocs.io/
MIT License
199 stars 18 forks source link

xcube.core.store.new_data_store to recognise AWS credentials from environment #465

Open AliceBalfanz opened 3 years ago

AliceBalfanz commented 3 years ago

Is your feature request related to a problem? Please describe. One needs to pass aws credentials via client_kwargs wenn configuring a new data store from a private bucket:

client_kwargs = {"aws_access_key_id":aws_access_key_id, "aws_secret_access_key":aws_secret_access_key} xcube_store_private_bucket = xcube.core.store.new_data_store("s3", bucket_name="xcube-gen", **client_kwargs)

It would be great to be able to use env varialbes as well:

%env AWS_ACCESS_KEY_ID aws_access_key_id %env AWS_SECRET_ACCESS_KEY aws_secret_access_key

and then be able to configure the new data store as following: xcube_store_private_bucket = xcube.core.store.new_data_store("s3", bucket_name="xcube-gen")

AliceBalfanz commented 3 years ago

This feature request is related to issue https://gitext.sinergise.com/dcfs/common/-/issues/307

forman commented 3 years ago

See also #412