smarty-archives / go-aws-auth

[DEPRECATED] Signs requests to Amazon Web Services (AWS) using IAM roles or signed signature versions 2, 3, and 4. Supports S3 and STS.
https://github.com/smartystreets/go-aws-auth/issues/49
Other
216 stars 71 forks source link

MissingAuthenticationTokenException #48

Open lapwat opened 6 years ago

lapwat commented 6 years ago

When I print the response, I get a 403 Forbidden with the following error MissingAuthenticationTokenException. I have nevertheless added the SecurityToken generated with

$ aws sts get_session-token

What am I doing wrong ? The error should be at least : WrongToken

Thank you

Edit

After calling :

awsauth.Sign(req)

req.Header is an empty map. Shouldn't it be populated with signed attributes ?

Edit 2

You may have inverted indexes, at least for my issue where host = "https://xxxxxxxxxx.execute-api.us-east-1.amazonaws.com"

Should be :

https://github.com/smartystreets/go-aws-auth/blob/0c1422d1fdb9fef5a1ad5b2e13ac663467eb767e/common.go#L49-L50