Skip to content

Commit

Permalink
[Backport release-2.19] Pass AWS client config when creating `STSAssu…
Browse files Browse the repository at this point in the history
…meRoleCredentialsProvider`. (#4619)

Backport 6b29117 from #4616.

Co-authored-by: KiterLuc <[email protected]>
  • Loading branch information
github-actions[bot] and KiterLuc authored Jan 12, 2024
1 parent fa30a88 commit a6a307d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions tiledb/sm/filesystem/s3.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <aws/s3/model/AbortMultipartUploadRequest.h>
#include <aws/s3/model/CreateMultipartUploadRequest.h>
#include <aws/sts/STSClient.h>
#include <boost/interprocess/streams/bufferstream.hpp>
#include <fstream>
#include <iostream>
Expand Down Expand Up @@ -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<Aws::Client::ClientConfiguration>(
tdb_new(Aws::Client::ClientConfiguration));
client_config_ = make_shared<Aws::Client::ClientConfiguration>(HERE());

s3_tp_executor_ = make_shared<S3ThreadPoolExecutor>(HERE(), vfs_thread_pool_);

Expand Down Expand Up @@ -1516,7 +1516,7 @@ Status S3::init_client() const {
session_name,
external_id,
load_frequency,
nullptr);
make_shared<Aws::STS::STSClient>(HERE(), client_config));
break;
}
case 7: {
Expand Down
2 changes: 1 addition & 1 deletion tiledb/sm/filesystem/s3.h
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,7 @@ class S3 {
mutable std::mutex client_init_mtx_;

/** Configuration object used to initialize the client. */
mutable tdb_unique_ptr<Aws::Client::ClientConfiguration> client_config_;
mutable shared_ptr<Aws::Client::ClientConfiguration> client_config_;

/** The executor used by 'client_'. */
mutable shared_ptr<S3ThreadPoolExecutor> s3_tp_executor_;
Expand Down

0 comments on commit a6a307d

Please sign in to comment.