OptimizeRasters icon indicating copy to clipboard operation
OptimizeRasters copied to clipboard

Hardcoded use of S3 Virtual addressing/hosting

Open mbeaucha opened this issue 3 years ago • 5 comments

Lines 337 and 3285 of OptimizeRasters.py hardcode the use of virtual addressing for S3. This breaks compatibility with certain regions and/or third-party S3 API implementations like MinIO. The code should be updated to either respect the value of 'addressing_style' in the ~/.aws/config file or the value of AWS_VIRTUAL_HOSTING, which is used by the embedded GDAL package to configure the same setting, or both. For completeness this should be a setting in the OptimizeRasters.xml file as well and an optional command line argument.

mbeaucha avatar Nov 15 '21 20:11 mbeaucha

@mbeaucha optimize raster support the addressing style from /.aws/config so in that case it should just work. in the template files we refer it using the profile. The profile is defined in the .aws/config

https://github.com/Esri/OptimizeRasters/issues/97#issuecomment-881205958

abhiataero avatar Nov 17 '21 07:11 abhiataero

@mbeaucha Hi, the addressing style was forced into 'virtual style' because the 'path style' type is no longer recommended by AWS and could be soon made obsolete if not already for the older clients. https://github.com/Esri/OptimizeRasters/issues/97#issuecomment-881205958. However, we'll look forward to take your recommendation to derive the path style using the ENV/config if set, else default to 'virtual' if omitted. Thanks!

Chamlika avatar Nov 17 '21 08:11 Chamlika

@Chamlika has this been taken care of

abhiataero avatar Dec 26 '21 06:12 abhiataero

@Chamlika has this been taken care of

@abhiataero Will look forward to include in the next release.

Chamlika avatar Dec 26 '21 06:12 Chamlika

@mbeaucha Let us know if the fix works for you, thanks!

For more info on the fixes, https://github.com/Esri/OptimizeRasters/commit/25c3ae7281728666e56779ff08b63981401cd999

Chamlika avatar Sep 19 '22 10:09 Chamlika