You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I'm using the apache-libcloud datastore and looking to access an S3 bucket that isn't in the AWS's us-east-1 region.
After setting up django-cloud-browser, I can see the bucket listed! (So easy to set up--thank you.) When I click the link to look in the bucket, Django throws an error:
<LibcloudError in <class 'libcloud.storage.drivers.s3.S3StorageDriver'> 'This bucket is located in a different region. Please use the correct driver. Bucket region "us-east-2", used region "us-east-1".'>
That's obviously an apache-libcloud error--it has a default region to fallback on. In looking up that error I found this:
My first question is--am I missing an obvious way to set the region keyword in django-cloud-browser so it gets picked up in apached-libcloud?
Second question is, assuming I'm not missing something...would it make sense to have a settings.py variable that could contain arbitrary kwargs that can be passed through to libcloud? Something like:
Or, since region seems to be a kwarg found for most (all?) classes in libcloud.storage.drivers, would it make sense to follow the pattern in 77e8f03 and add a CLOUD_BROWSER_APACHE_LIBCLOUD_REGION variable?
I'd be happy to work up a PR doing this if the approach make sense.
The text was updated successfully, but these errors were encountered:
Hi! I'm using the
apache-libcloud
datastore and looking to access an S3 bucket that isn't in the AWS'sus-east-1
region.After setting up
django-cloud-browser
, I can see the bucket listed! (So easy to set up--thank you.) When I click the link to look in the bucket, Django throws an error:<LibcloudError in <class 'libcloud.storage.drivers.s3.S3StorageDriver'> 'This bucket is located in a different region. Please use the correct driver. Bucket region "us-east-2", used region "us-east-1".'>
That's obviously an
apache-libcloud
error--it has a default region to fallback on. In looking up that error I found this:apache/libcloud#1379 (comment)
...and it looks like the fix is to explicitly pass a region kwarg to get_driver constructor. Make sense.
I read through the
django-cloud-browser
documentation and source but it doesn't look like there is way to pass additional kwargs through to here:django-cloud-browser/cloud_browser/cloud/apache_libcloud.py
Line 162 in 3eda8c8
via here:
django-cloud-browser/cloud_browser/cloud/config.py
Line 32 in 3eda8c8
My first question is--am I missing an obvious way to set the region keyword in
django-cloud-browser
so it gets picked up inapached-libcloud
?Second question is, assuming I'm not missing something...would it make sense to have a
settings.py
variable that could contain arbitrary kwargs that can be passed through to libcloud? Something like:Or, since
region
seems to be a kwarg found for most (all?) classes inlibcloud.storage.drivers
, would it make sense to follow the pattern in 77e8f03 and add aCLOUD_BROWSER_APACHE_LIBCLOUD_REGION
variable?I'd be happy to work up a PR doing this if the approach make sense.
The text was updated successfully, but these errors were encountered: