okigan/awscurl

v0.34 - The request signature we calculated does not match the signature you provided error

Closed this issue · 5 comments

I'm getting error when using release v0.34.
"The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details."

When I downgraded to v0.33, code started to work without issues.

I'm using in python like

        payload = json.dumps({
            <redacted>
        })
        session = boto3.Session()
        creds = session.get_credentials()
        response = awscurl.make_request(
            method='POST',
            service='<redacted>',
            region=self.region,
            uri=self.uri + <redacted>,
            headers={
                "Content-Type": "application/json; charset=UTF-8",
                "Connection": "keep-alive",
                "Content-Encoding": "amz-1.0",
                "x-amz-requestsupertrace": "true"
            },
            data=payload,
            data_binary=False,
            access_key=creds.access_key,
            secret_key=creds.secret_key,
            security_token=creds.token
        )
        return (json.loads(response.text), response)

Seems to be introduced in Include user-specified signed headers (#200) 22cebb0

and the above code has "x-amz-requestsupertrace" header

@MegaWattSec

@skibak try latest v0.35 build -- let us know if that resolved the issue

@skibak kind nudge for the above

I checked release 0.35 and it works fine.
Thanks!

verified