[CP] Disables IMDS to prevent auto-region detection during S3ClientConfiguration construction
This commit is contained in:
@ -136,8 +136,13 @@ int ObS3Client::init_s3_client_configuration_(const ObS3Account &account,
|
||||
int ObS3Client::init(const ObS3Account &account)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
void *client_buf = NULL;
|
||||
S3ClientConfiguration config;
|
||||
void *client_buf = nullptr;
|
||||
// Disables IMDS to prevent auto-region detection during construction.
|
||||
ClientConfigurationInitValues init_values;
|
||||
init_values.shouldDisableIMDS = true;
|
||||
S3ClientConfiguration config(init_values);
|
||||
// Re-enables IMDS access for subsequent operations if needed
|
||||
config.disableIMDS = false;
|
||||
Aws::Auth::AWSCredentials credentials(account.access_id_, account.secret_key_);
|
||||
SpinWLockGuard guard(lock_);
|
||||
if (OB_UNLIKELY(is_inited_)) {
|
||||
|
||||
Reference in New Issue
Block a user