Python’s s3fs.S3FileSystem passes config_kwargs to the underlying Botocore client configuration. Supply the proxy mapping at construction:

import s3fs

filesystem = s3fs.S3FileSystem(
    anon=False,
    config_kwargs={
        "proxies": {
            "https": "http://proxy.example.net:8080",
        },
    },
)

The https key selects HTTPS destinations, and the HTTP URL identifies the intermediary, with public candidates available in the HTTP proxy list for that route. Add an http mapping if the workload intentionally uses a plain HTTP S3-compatible endpoint.

Retain the application’s AWS credentials, region and endpoint configuration. anon=False does not itself supply credentials.

Set config_kwargs before this filesystem establishes its S3 client. Editing the original dictionary afterward is not a supported way to replace an existing client’s transport policy.

Ũhoro ũhĩtĩte