How do you force Protocol.HTTP with java S3 SDKv2?

0

With SDK v1, the protocol could be set via ClientConfiguration:

AmazonS3ClientBuilder.standard()
            .withClientConfiguration(new ClientConfiguration().withProtocol(Protocol.HTTP))
            ...
            .build();

I'm unable to find a similar configuration in S3ClientBuilder, SdkHttpClient.Builder, or a variety of other classes I've looked through (e.g., S3Configuration, SdkClientOption, etc).

My current plan is to useExecutionInterceptor.modifyHttpRequest to force the protocol in SdkHttpRequest but I'm wondering if there's something I've overlooked.

1 Risposta
0

Hi - The ClientConfiguration options from 1.11.x have changed in 2.0 of the SDK and don't have direct equivalents. Refer https://github.com/aws/aws-sdk-java-v2/blob/master/docs/LaunchChangelog.md#136-other-options which shows how to use client builder to override the endpoint url.

clientBuilder.endpointOverride(URI.create("http://..."))
AWS
ESPERTO
Gokul
con risposta 2 anni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande