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 Resposta
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
ESPECIALISTA
Gokul
respondido há 2 anos

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas