diff --git a/src/aws-cpp-sdk-core/include/aws/core/auth/signer/AWSAuthV4Signer.h b/src/aws-cpp-sdk-core/include/aws/core/auth/signer/AWSAuthV4Signer.h index cc0cce9487e..668b0623339 100644 --- a/src/aws-cpp-sdk-core/include/aws/core/auth/signer/AWSAuthV4Signer.h +++ b/src/aws-cpp-sdk-core/include/aws/core/auth/signer/AWSAuthV4Signer.h @@ -221,6 +221,7 @@ namespace Aws mutable Utils::Threading::ReaderWriterLock m_partialSignatureLock; PayloadSigningPolicy m_payloadSigningPolicy; bool m_urlEscapePath; + mutable Aws::Crt::Auth::Sigv4HttpRequestSigner m_crtSigner{}; }; } // namespace Client } // namespace Aws diff --git a/src/aws-cpp-sdk-core/source/auth/signer/AWSAuthV4Signer.cpp b/src/aws-cpp-sdk-core/source/auth/signer/AWSAuthV4Signer.cpp index 5f55a842aca..b82dc6a9f8d 100644 --- a/src/aws-cpp-sdk-core/source/auth/signer/AWSAuthV4Signer.cpp +++ b/src/aws-cpp-sdk-core/source/auth/signer/AWSAuthV4Signer.cpp @@ -146,10 +146,8 @@ bool AWSAuthV4Signer::SignRequestWithSigV4a(Aws::Http::HttpRequest& request, con awsSigningConfig.SetCredentials(crtCredentials); std::shared_ptr crtHttpRequest = request.ToCrtHttpRequest(); - - auto sigv4HttpRequestSigner = Aws::MakeShared(v4AsymmetricLogTag); bool success = true; - sigv4HttpRequestSigner->SignRequest(crtHttpRequest, awsSigningConfig, + m_crtSigner.SignRequest(crtHttpRequest, awsSigningConfig, [&request, &success, signatureType](const std::shared_ptr& signedCrtHttpRequest, int errorCode) { success = (errorCode == AWS_ERROR_SUCCESS); if (success)