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.

질문됨 2년 전707회 조회
1개 답변
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
전문가
Gokul
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠