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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠