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 Respuesta
0
Respuesta aceptada

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);
respondido hace 2 años

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas