<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">I’m seeing that it’s getting a 206 response code, so wouldn’t that indicate auth is working?<div><br></div><div><div><font face="Courier New" size="3"><span style="font-style: normal;"> gdalinfo /vsis3/grid-dev-publiclidar/estonia/dtm/estonia_dtm_5m.tif</span></font></div><div><font face="Courier New" size="3"><span style="font-style: normal;">HTTP: Fetch(http://169.254.169.254/latest/api/token)</span></font></div><div><font face="Courier New" size="3"><span style="font-style: normal;">HTTP: libcurl/7.86.0 OpenSSL/3.0.7 zlib/1.2.13 libssh2/1.10.0 nghttp2/1.47.0</span></font></div><div><font face="Courier New" size="3"><span style="font-style: normal;">HTTP: These HTTP headers were set: X-aws-ec2-metadata-token-ttl-seconds: 10</span></font></div><div><font face="Courier New" size="3"><span style="font-style: normal;">HTTP: Fetch(http://169.254.169.254/latest/meta-data/iam/security-credentials/)</span></font></div><div><font face="Courier New" size="3"><span style="font-style: normal;">HTTP: Fetch(http://169.254.169.254/latest/meta-data/iam/security-credentials/iam-grid-s3)</span></font></div><div><font face="Courier New" size="3"><span style="font-style: normal;">AWS: Storing AIM credentials until 2022-11-19T20:42:58Z</span></font></div><div><font face="Courier New" size="3"><span style="font-style: normal;">S3: Downloading 0-16383 (https://grid-dev-publiclidar.s3.amazonaws.com/estonia/dtm/estonia_dtm_5m.tif)...</span></font></div><div><font face="Courier New" size="3"><span style="font-style: normal;">S3: Got response_code=206</span></font></div><div><font face="Courier New" size="3"><span style="font-style: normal;">gdalinfo failed - unable to open '/vsis3/grid-dev-publiclidar/estonia/dtm/estonia_dtm_5m.tif'.</span></font></div><div><br></div><br><div dir="ltr">Mike</div><div dir="ltr"><br></div><div dir="ltr"><br></div><div dir="ltr"><br><blockquote type="cite">On Nov 19, 2022, at 9:26 AM, Even Rouault <even.rouault@spatialys.com> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><span>Hi Mike,</span><br><span></span><br><span>could you send the output of</span><br><span></span><br><span>curl http://169.254.169.254/latest/meta-data/iam/security-credentials/iam-grid-s3</span><br><span></span><br><span>Slightly redacted of course, but with the exact formatting. This part of thee code currently uses a "simple JSON parser" (https://github.com/OSGeo/gdal/blob/c61d116a469821b769630a112dee7f1a61fed885/port/cpl_aws.cpp#L554), which is actually just a non JSON-aware string tokenizer, and I suspect it could be defeated by a new formatting of S3 or something specific to your credentials.</span><br><span></span><br><span>It could also be that something unhandled by that parser appears inside quoted strings, like an escaped double quote or some other JSON escaped character (like an escaped forward slash \/ )</span><br><span></span><br><span>If that was the case we should likely switch to proper JSON deserialization (that part of the code must predate libjson-c being a build requirement of GDAL).</span><br><span></span><br><span>Even</span><br><span></span><br><span></span><br><span>-- </span><br><span>http://www.spatialys.com</span><br><span>My software is free, but my time generally not.</span><br><span></span><br></div></blockquote></div></body></html>