Add support for service-specific endpoint env var (AWS_ENDPOINT_URL_S3)

AWS_ENDPOINT_URL_S3 is a service-specific endpoint variable defined in the AWS SDK specification. It takes priority over the global AWS_ENDPOINT_URL, allowing users to set a custom endpoint for S3 only without affecting other AWS services.

The C++ SDK is the only AWS SDK that does not handle these variables automatically, so we check both with the correct precedence:

  1. AWS_ENDPOINT_URL_S3 (service-specific, highest priority)
  2. AWS_ENDPOINT_URL (global)

Reference: https://docs.aws.amazon.com/sdkref/latest/guide/feature-ss-endpoints.html

How to test

# Service-specific endpoint
AWS_ENDPOINT_URL_S3=https://your-endpoint.example.com kioclient ls s3://bucket/

# Service-specific takes priority over global
AWS_ENDPOINT_URL_S3=https://correct.example.com AWS_ENDPOINT_URL=https://wrong.example.com kioclient ls s3://bucket/

# Global still works (backwards compatible)
AWS_ENDPOINT_URL=https://your-endpoint.example.com kioclient ls s3://bucket/

Merge request reports

Loading