[gdal-dev] Failing to write to s3 using GTiff driver.

William Roper roper.william at gmail.com
Mon Aug 15 02:45:01 PDT 2022


Hi list,

I'm trying to convert a GeoTiff on s3 into a COG, that will also live on
s3. I'm working on EC2 instances, or fargate containers, because local
download and upload speeds are a bit slow.

gdalwarp \
  --config AWS_SECRET_ACCESS_KEY <my-secret-key> \
  --config AWS_ACCESS_KEY_ID <my-access-key> \
  --config CPL_VSIL_USE_TEMP_FILE_FOR_RANDOM_WRITE YES \
  --config CPL_TMPDIR /tmp \
  -of COG
  -co TILING_SCHEME=GoogleMapsCompatible
  -co COMPRESS=DEFLATE
  -co NUM_THREADS=ALL_CPUS
  /vsis3/my-bucket/original-old-geotif.tif
  /vsis3/my-bucket/shiny-new-cog.tif


And get the following error:

0...10...20...30...ERROR 1: Only read-only mode is supported for /vsicurl


I get the same issue running in a docker container (osgeo/gdal:latest) or
on an ubuntu EC2 instance with gdal-bin installed with apt  (version
3.4.1).

I can work around it by writing the COG to the machine, and then uploading
to s3, but was wondered what I was doing wrong/not understanding.

Many thanks
Will
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20220815/66c88166/attachment.htm>


More information about the gdal-dev mailing list