From a6a307dec949538c4e7e27edb5b02b8564176641 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 12 Jan 2024 10:43:41 +0100 Subject: [PATCH] [Backport release-2.19] Pass AWS client config when creating `STSAssumeRoleCredentialsProvider`. (#4619) Backport 6b291176e6c63ce33bdd3e00418d7c80ae066acf from #4616. Co-authored-by: KiterLuc <67824247+KiterLuc@users.noreply.github.com> --- tiledb/sm/filesystem/s3.cc | 6 +++--- tiledb/sm/filesystem/s3.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tiledb/sm/filesystem/s3.cc b/tiledb/sm/filesystem/s3.cc index f645c614948..8ff2993a286 100644 --- a/tiledb/sm/filesystem/s3.cc +++ b/tiledb/sm/filesystem/s3.cc @@ -51,6 +51,7 @@ #include #include #include +#include #include #include #include @@ -1420,8 +1421,7 @@ Status S3::init_client() const { // check for client configuration on create, which can be slow if aws is not // configured on a users systems due to ec2 metadata check - client_config_ = tdb_unique_ptr( - tdb_new(Aws::Client::ClientConfiguration)); + client_config_ = make_shared(HERE()); s3_tp_executor_ = make_shared(HERE(), vfs_thread_pool_); @@ -1516,7 +1516,7 @@ Status S3::init_client() const { session_name, external_id, load_frequency, - nullptr); + make_shared(HERE(), client_config)); break; } case 7: { diff --git a/tiledb/sm/filesystem/s3.h b/tiledb/sm/filesystem/s3.h index 038472876bb..2724f80c31a 100644 --- a/tiledb/sm/filesystem/s3.h +++ b/tiledb/sm/filesystem/s3.h @@ -886,7 +886,7 @@ class S3 { mutable std::mutex client_init_mtx_; /** Configuration object used to initialize the client. */ - mutable tdb_unique_ptr client_config_; + mutable shared_ptr client_config_; /** The executor used by 'client_'. */ mutable shared_ptr s3_tp_executor_;