Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GenericApiGatewayClient for Http DELETE method gives unmatched signature exception #5

Open
cvuijst opened this issue Nov 24, 2017 · 4 comments

Comments

@cvuijst
Copy link

cvuijst commented Nov 24, 2017

Hi Ryan,

First of all: Great job! I have successfully used this library for Http(s) GET, PUT and POST invocations on my AWS API Gateway API entry, secured by AWS IAM. Again, thank you for your work!
My question is as follows: when I try to use it for a Http DELETE invocation, I get:

ca.ryangreen.apigateway.generic.GenericApiGatewayException: {"message":"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."} (Service: execute-api; Status Code: 403; Error Code: InvalidSignatureException; Request ID: xx0000xx-x000-00x0-etc.)

Do you know what's causing this? Just like the PUT and POST calls, I'm using a request in the DELETE as well.

Best regards,

Charles Vuijst

@cvuijst
Copy link
Author

cvuijst commented Nov 24, 2017

Hi Ryan,
Meanwhile I did some additional searching and found at: http://docs.aws.amazon.com/apigateway/api-reference/signing-requests/ the following:

The canonical request must include the host and x-amz-date headers for requests without a payload, such as GET or DELETE and must also include the content-type header for requests requiring a payload, such as PATCH, POST or PUT.

So instead I tried a DELETE execution without an Http request body and put an identifier on the path variable instead for the deletion in the API. That works with your library as well! So this looks like the solution, but could be considered a work around:DELETE calls from Postman with an AWS signing signature and a request body seem to work. Anyhow, still happy to use your work,
Best regards,

Charles

@cherryngai
Copy link

Since DELETE with Payload works in Postman, it shows AWS Gateway supports it.

Would AWS update the AWS SDK to make DELETE with payload work?

@rpgreen
Copy link
Owner

rpgreen commented Jun 22, 2019 via email

@cherryngai
Copy link

Thanks @rpgreen . I have created https://forums.aws.amazon.com/thread.jspa?threadID=305306.

My usecase requires a payload on DELETE.

If someone can help, it is appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants