I'm trying to get the an object from S3 using the aws-sdk-cpp, but get "" error. I successfully access the file directly from web browser.
Here my code:
static const char* ALLOCATION_TAG = "App_TransferFiles_TAG";
// Create a client
ClientConfiguration config;
config.scheme = Scheme::HTTP;
config.connectTimeoutMs = 30000;
config.requestTimeoutMs = 30000;
m_s3Client = Aws::MakeShared<S3Client>(ALLOCATION_TAG, config);
TransferClientConfiguration transferConfig;
transferConfig.m_uploadBufferCount = 20;
m_transferClient = Aws::MakeShared<TransferClient>(ALLOCATION_TAG, m_s3Client, transferConfig);
GetObjectRequest getObjectRequest;
getObjectRequest.SetBucket(""MyBucketName");
getObjectRequest.SetKey("My_CONTENT_FILE_KEY");
GetObjectOutcome getObjectOutcome = m_s3Client->GetObject(getObjectRequest);
"m_s3Client->GetObject(getObjectRequest);" return an Error after long waiting!!! Error: "Unable to connect to endpoint"
What I'm missing?