locationtech / geotrellis

GeoTrellis is a geographic data processing engine for high performance applications.
http://geotrellis.io
Other
1.33k stars 362 forks source link

AWS S3 RequestPayer env variable #3478

Closed pomadchin closed 2 years ago

pomadchin commented 2 years ago

It could be convenient to have it configurable via env variable AWS_REQUEST_PAYER like GDAL allows. With AWS SDK V2 it's configured via GetObjectRequest.builder:

GetObjectRequest.builder().requestPayer(...)
pomadchin commented 2 years ago

A less invasive approach can be by overrding the config and adding headers to all requests:

// not checked that it works
val overrideConfig =
  ClientOverrideConfiguration.builder()
    .retryPolicy(retryPolicy)
    .putHeader("x-amz-request-payer", "requester")
    .build()

For pre-signed URIs see https://github.com/aws/aws-sdk-java-v2/issues/2000