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年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ