Replies: 3 comments 1 reply
-
Foun this: https://gdal.org/api/cpl.html#_CPPv415VSIGetSignedURLPKc12CSLConstList
So it seems like it might have been wrong to have a separate "bucket_hostname" in my previous entry. (No idea how we get from s3://bucket/path/file to /vsis3/bucket/path/file. So this sets me back to the first step. |
Beta Was this translation helpful? Give feedback.
-
Now I got nothing usefull at all in the AWS Cloudwatch logs, but I still get http code 500, internal server error. wget output, (Hostname and IP numbers modified.)
|
Beta Was this translation helpful? Give feedback.
-
Now this command has started working, (and the info endpoint as well)
I have found several mistakes on my side so far.
Problems in current code/documentation: Found after consulting https://developmentseed.org/titiler/deployment/aws/intro/:
|
Beta Was this translation helpful? Give feedback.
-
I have tried to use titiler / titiler-pds to display tiles for Sentinel 2.
Since I aim at using this at a larger scale, and we have the rest of the soultion on AWS in eu-north-1 ("Stockholm").
So I am aiming at using an S3 bucket from my account (after issues with private bucket, I changed to a public bucket with requester pays).
I liked the CDK code for titiler better than what was in titiler-pds, so I thought I would use that repository,
Wanting to run custom code forced me to rewrite the Dockerfile used for the lambda deployment to use the current code instead of already delivered code.
I use a modified verison of https://github.com/cogeotiff/rio-tiler-pds/blob/master/rio_tiler_pds/sentinel/aws/sentinel2.py
to control S3 Bucket name (and possibly path used).
When using my public requester pays-bucket, I got this message in log from executing the request.
I am trying to access the info endpoint.
wget https://MYSTACK.execute-api.eu-north-1.amazonaws.com/scenes/sentinel/info?sceneid="S2A_MSIL2A_20220210T102151_N0400_R065_T33VWF_20220210T141713"
And this is what I get in the logs:
Running the same code locally in a docker image worked, I could point a local QGis client towards titiler, probably using WMTSCapabilities.xml,
From this, I deduce that I am able to read the tileInfo.json using the boto-wrapper:
self.tileInfo = json.loads(get_object(self.hostname, f"{prefix2}/tileInfo.json"))
I know this since I have try -expect around this statement and I see nothing about this. So I assume the first boto-call to getting an object works fine.
But reading the actual cogeo-Tif (the bands) fails:
Do I need to enable S3 endpoints for the /vsis3-drivers to work?
I looked at the code in S2L2ACOGReader, and thought that the URL to the file in the S3 might be wrong,
so I tried to modify
_get_band_url()
, and fill in what looks like a more correct URL (I have no idea what vsis3 does)bucket_hostname = self.hostname + ".s3.eu-north-1.amazonaws.com";
return f"{self._scheme}://{bucket_hostname}/{prefix}/{band}.tif"
WIth this code, using a differnt URL, I got a different error message:
I did not manage to get anything conclusive from this last error message.
Otherwise, any tips on how to debug things in the lambda?
Beta Was this translation helpful? Give feedback.
All reactions