Injecting credentials into C++ S3 CRT SDK

0

I want to specify a credentials file for the S3 CRT SDK to use that is not in the default location. I do not have access to change environment variables on the host machine. Is there a way to override the AWS_SHARED_CREDENTIALS_FILE variable in code or otherwise specify where to find the credentials so the SDK will find the credentials file I want?

1 個回答
0
已接受的答案

It turns out that there is a constructor for the S3CrtClient that accepts a credentials argument. Looks like that is the way to go.

S3CrtClient(const Aws::Auth::AWSCredentials& credentials, const Aws::S3Crt::ClientConfiguration& clientConfiguration = Aws::S3Crt::ClientConfiguration(), Aws::Client::AWSAuthV4Signer::PayloadSigningPolicy signPayloads = Aws::Client::AWSAuthV4Signer::PayloadSigningPolicy::Never, bool useVirtualAddressing = true, Aws::S3Crt::US_EAST_1_REGIONAL_ENDPOINT_OPTION USEast1RegionalEndPointOption = Aws::S3Crt::US_EAST_1_REGIONAL_ENDPOINT_OPTION::NOT_SET);
已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南