2

I tried something like:

Aws::Client::ClientConfiguration config;
config.endpointOverride = Aws::String("localhost:9000");

It does not work.

It seems that AWS-SDK-CPP by default uses virtual hosting:

https://bucket-name/s3.amazonaws.com

However, to access Minio, we need path style access:

https://localhost:9000/minio/bucket-name

In AWS-SDK-JAVA, there is:

AmazonS3ClientBuilder.withPathStyleAccessEnabled(true)

is there something similar in AWS-SDK-CPP?

1 Answer 1

4

The switch between path style and virtual hosting is in S3Client constructor:

S3Client(const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration(), bool signPayloads = false, bool useVirtualAdressing = true);

turn it off, as in:

Aws::Client::ClientConfiguration config;
config.endpointOverride = Aws::String("172.31.30.127:9000");
config.scheme = Aws::Http::Scheme::HTTP;
auto client = Aws::MakeShared<S3Client>("sample_s3_client", config, false, false);
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.