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

Add S3 to Browser panel #35450

Closed
andrewharvey opened this issue Mar 30, 2020 · 14 comments · Fixed by #57870
Closed

Add S3 to Browser panel #35450

andrewharvey opened this issue Mar 30, 2020 · 14 comments · Fixed by #57870

Comments

@andrewharvey
Copy link
Contributor

Feature description.
The Browser panel is neat, I can list a local directory, list all my PostGIS databases and tables, etc. it would be nice to have an S3 item here where you could add buckets, then expanding each bucket would list all the files in the bucket just like the file directory.

This makes it a lot easier and faster to work with data stored in S3 buckets without needing to manually enter the bucket name and object key for each file in the add vector/raster dialog.

A workaround is to mount the bucket on your local file system using something like https://github.com/s3fs-fuse/s3fs-fuse, but that takes configuration and setup, so something out of the box with QGIS would be nice.

@palmerj
Copy link
Contributor

palmerj commented Mar 30, 2020

Yes would be a great feature. How would you see this feature working with access keys?

@andrewharvey
Copy link
Contributor Author

Yes would be a great feature. How would you see this feature working with access keys?

With QGIS 3.12 you can define any of the GDAL AWS variables (https://gdal.org/user/virtual_file_systems.html#vsis3-aws-s3-files-random-reading) under Project | Variables which is very nice and what I do (since sometimes I use other services which are S3 compatible so I need to set the endpoint variable anyway).

I'm also assuming these variables are set if exported in the shell which you start qgis (though not many people would start qgis from the shell).

I guess though you'd want something similar to what it does for PostgreSQL, you choose a new bucket (instead of new connection for psql) and set the keys in a UI dialog.

@NathanW2
Copy link
Member

NathanW2 commented Mar 30, 2020 via email

@palmerj
Copy link
Contributor

palmerj commented Mar 30, 2020

I'm also assuming these variables are set if exported in the shell which you start qgis (though not many people would start qgis from the shell).

I set the GDAL environment variables in QGIS so they override the system environment variables. But either way they are QGIS instance wide and I use S3 buckets that require different keys because they come from different AWS accounts.

I guess though you'd want something similar to what it does for PostgreSQL, you choose a new bucket (instead of new connection for psql) and set the keys in a UI dialog.

Yes and these keys only apply to that bucket connection. As @NathanW2 mentions using the QGIS password store would be good.

@savmickael
Copy link
Contributor

👍

@lobenichou
Copy link

Just wanted to chime in here that it would be quite useful to be able to add s3 as a favorite in the browser panel, especially when using COG files. This is a bit old so I wanted to revive the thread.

@drwelby
Copy link

drwelby commented Feb 8, 2023

+1 to the above: with cloud-optimized file formats like STAC and COG becoming more popular this would be a very useful feature.

@rockliffelewis
Copy link

Yes would be a great feature. How would you see this feature working with access keys?

It would be nice to be able to specify multiple end points with different credentials for each to use as a root in the browser tree which is not very easy to do with the GDAL VSI environment variables.

It would also be good to be able to specify a prefix to use as the root of the browser tree for occasions where the access given is limited to a prefix rather than the root of the bucket

Cloud based delivery of Earth Observation raster imagery is becoming more prevalent, and this would enable some nice usage patterns within QGIS

@nyalldawson nyalldawson self-assigned this Jun 19, 2024
@nyalldawson
Copy link
Collaborator

I'm working on this for 3.40 👍

@rockliffelewis
Copy link

Yes would be a great feature. How would you see this feature working with access keys?

It would be nice to be able to specify multiple end points with different credentials for each to use as a root in the browser tree which is not very easy to do with the GDAL VSI environment variables.

I figured out a way to do this using the GDAL_CONFIG environment variable and creating a config file with the various s3 endpoints and credentials like this https://gdal.org/user/virtual_file_systems.html#how-to-set-credentials

It would be great if this could be integrated into the QGIS key store though

@rockliffelewis
Copy link

I also attempted to deal with adding s3 to the qgis key store here:
#53778

which might be useful to you, although im not sure my approach was the best one

@nyalldawson
Copy link
Collaborator

@rockliffelewis
I did see that! My current project won't involve the authentication framework at all (rather I am targeting the plain text storage of the connection options), but it WILL make it much easier for an authentication framework plugin (like yours) to be completed

@robbibt
Copy link

robbibt commented Sep 3, 2024

Hey @nyalldawson, have been trying to work out whether this feature is already available in a current version of QGIS, or is it due for release down the track?

@agiudiceandrea
Copy link
Contributor

agiudiceandrea commented Sep 3, 2024

@robbibt, it will be available since QGIS 3.40. It is currently available using a recently built QGIS 3.39 developing version.

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

Successfully merging a pull request may close this issue.

10 participants