Aws-sdk-go: IncompleteSignature error coming from CloudFormation AWS4 request

Created on 22 Jun 2015  路  6Comments  路  Source: aws/aws-sdk-go

For some reason I am getting this error:

IncompleteSignature: '/20150620/us-east-1/cloudformation/aws4_request' not a valid key=value pair (missing equal-sign) in Authorization header: 'AWS4-HMAC-SHA256 Credential=AKIAXXXXXXXXXX /20150620/us-east-1/cloudformation/aws4_request, SignedHeaders=host;x-amz-date, Signature=240c93ba3610c73bde4e52dd5a93dd61a80b3ba2871208d7365c9cc7032d5c6f'.

I'm just using credentials.NewEnvCredentials() for the authorisation material (which seems to work with other services, just not this one) so I'm not sure if there's a user error involved.

Most helpful comment

Looks like you probably have a space at the end of your AWS_ACCESS_KEY_ID environment variable.

All 6 comments

Looks like you probably have a space at the end of your AWS_ACCESS_KEY_ID environment variable.

I think you are right. Thanks!

Even I got the same issue, but the removal of extra space after the access key didn't solve the problem.
Please help
Thanks

Hello @lkv123, thank you for reaching out to us. Sometimes people will accidentally swap the keys. Are you sure you are using the right keys for the right environment variable? In addition, how are you loading your credentials and what error are you receiving? What is the Golang and SDK version you are using?

@lsegal, Thanks work for me.!!

Looks like you probably have a space at the end of your AWS_ACCESS_KEY_ID environment variable.

Could you trim it to avoid future headaches ? Thanks

Was this page helpful?
0 / 5 - 0 ratings