aws sdk – IncompleteSignature exception with CloudWatchClient::PutMetricData

Sending a request with CloudWatchClient::PutMetricData in the AWS C++ SDK results in an IncompleteSignature exception with the following details: Authorization header requires 'Signature' parameter. Authorization header requires 'SignedHeaders' parameter. (Hashed with SHA-256 and encoded with Base64) Authorization=.

I do not understand how to solve this issue. It really seems to be related to how the request is signed, which is an implementation detail I do not seem to have any direct control over. I can prove that the credentials are correct by comparing the result of aws configure list with the results of invoking InstanceProfileCredentialsProvider::GetAWSCredentials() and both are the same. I am able to successfully submit the same metric data using the command line in the same environment by leveraging the iam-role on my EC2 instance.

Any suggestions as to how this signature problem could be fixed?

Read more here: Source link