Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass AWS client config when creating STSAssumeRoleCredentialsProvider. #4616

Merged
merged 1 commit into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -1307,8 +1308,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 @@ -1403,7 +1403,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 @@ -1240,7 +1240,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
Loading