Unable to use presigned S3 URLs #1280
Unanswered
corral0824
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Titiler community! First thanks for all the good work you have been up to. Titiler is an amazing tool.
DEPLOYMENT:
CONTEXT:
I was firstly trying to set up Element84's Filmdrop in a STAC I have deployed locally and came across some issues when rendering COGs with Titiler. The URL that was not working was the following
http://127.0.0.1:8002/stac/tiles/9/137/203@1x.png?url=http://localhost:8000/collections/SATELLITE/items/ITEMID&assets=cog&color_formula=Gamma+RGB+2.2+Saturation+0.6+Sigmoidal+RGB+10+0.2
Note that I was running Titiler in port 8002 as STAC was running in port 8000.
As I could not make it work, I dag deep into the issue, trying to first visualize a preview using my local titiler deployment, and finally managed to at least load a preview using titiler, the following way
http://127.0.0.1:8001/collections/SATELLITE/items/ITEMID/preview?assets=cog&bidx=3&bidx=2&bidx=1&rescale=628,1999&rescale=940,2124&rescale=1000,2105&max_size=1024
I also proved that the presigned URLs allowed range requests by making the following curls
curl --output - -r 0-1000 "PRESIGNED URL"
However, when trying to visualize the cog using the documentations endpoints
http://127.0.0.1:8002/cog/WebMercatorQuad/tilejson.json?url={AWS_PRESIGNED_URL}
I get an error response
{"detail":"HTTP response code: 400"}
I managed to make it work and visualize a map with my COG using python and your working with COG example using httpx:
https://developmentseed.org/titiler/examples/notebooks/Working_with_CloudOptimizedGeoTIFF_simple/
However I don't manage to replicate your working with signed URLs example. For instance I have tried doing
`import base64
import requests
signed = "LONG_SIGNED_S3_URL"
b64 = base64.b64encode(signed.encode()).decode("utf-8")
value = f"b64:{b64}"
resp = requests.get(
"http://127.0.0.1:8002/cog/info",
params=[("url", value)]
)
print(resp.json())`
but this will return that the query is too long:
File name too long
QUESTIONS:
Thanks for your attention and help.
Beta Was this translation helpful? Give feedback.
All reactions