I am writing an APP talking with 3rd (no aws) storage compatible with s3 (bucket and object service) by using AWS SDK CPP.
I tried to use below code to override endpoint, e.g., http://192.168.10.10:8800, but it doesn't work and return "InternalError". Could anyone please give a hand ? thanks in advance.
{
Aws::SDKOptions options;
Aws::SDKOptions options;
Aws::SDKOptions options;`
Aws::InitAPI(options);
ClientConfiguration config;
config.scheme = Scheme::HTTP;
config.connectTimeoutMs = 30000;
config.requestTimeoutMs = 30000;
config.endpointOverride = "192.168.10.10:8800" //customized address
Aws::S3::S3Client *s3client = new Aws::S3::S3Client(Aws::Auth::AWSCredentials("key", "secret"), config);
auto list_buckets_outcome = s3client->ListBuckets();
if( list_buckets_outcome.IsSuccess())
std::cout << "List OK" << std::endl;
else
std::cout << "List Error" <<
list_buckets_outcome.GetError().GetExceptionName() <<
list_buckets_outcome.GetError().GetMessage() << std::endl;
Aws::ShutdownAPI(options);
}