diff --git a/deps/oblib/src/lib/restore/ob_storage_s3_base.cpp b/deps/oblib/src/lib/restore/ob_storage_s3_base.cpp index 061df76f53..f17eaf434f 100644 --- a/deps/oblib/src/lib/restore/ob_storage_s3_base.cpp +++ b/deps/oblib/src/lib/restore/ob_storage_s3_base.cpp @@ -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_)) {