Skip to content

Instantly share code, notes, and snippets.

@kdeloach
Created October 28, 2015 18:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kdeloach/92214a6ceff657eade09 to your computer and use it in GitHub Desktop.
Save kdeloach/92214a6ceff657eade09 to your computer and use it in GitHub Desktop.
vsicurl with signed url test
import boto3
from osgeo import gdal
gdal.UseExceptions()
client = boto3.client('s3')
uri = client.generate_presigned_url('get_object', {
'Bucket': 'raster-foundry-kdeloach',
'Key': '1-11cfbd00-fe9c-4dff-bcb8-695aebf756d5.tif',
})
uri = '/vsicurl/' + uri
print(uri)
print(gdal.Open(uri))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment