std::shared_ptr S3Init::initializeS3Client()

in awsio/csrc/io/s3/s3_io.cpp [272:286]


std::shared_ptr<Aws::S3::S3Client> S3Init::initializeS3Client() {
    std::lock_guard<std::mutex> lock(this->initialization_lock_);
    if (this->s3_client_.get() == nullptr) {
        Aws::SDKOptions options;
        Aws::InitAPI(options);

        // Set up the request
        this->s3_client_ =
            std::shared_ptr<Aws::S3::S3Client>(new Aws::S3::S3Client(
                setUpS3Config(),
                Aws::Client::AWSAuthV4Signer::PayloadSigningPolicy::Never,
                false));
    }
    return this->s3_client_;
}