By using AWS re:Post, you agree to the Terms of Use
/How do you force Protocol.HTTP with java S3 SDKv2?/

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


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

            .withClientConfiguration(new ClientConfiguration().withProtocol(Protocol.HTTP))

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 Answers

Hi - The ClientConfiguration options from 1.11.x have changed in 2.0 of the SDK and don't have direct equivalents. Refer which shows how to use client builder to override the endpoint url.

answered a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions