Issue statement: When I add headers in request parameter to serverless.yml file, the header mapping is created for both method and integration ( in 1.26). However, the behaviour in version 1.24.1. is, it creates only in method but not in integration.
With the behavior as in 1.26, and with headers added to request parameters, the error we get when tested is as shown below.
“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.”
Question: Is there anyway to add the request parameter headers only to method and not to integration?
@aditmalik, I believe the issue i mentioned is exactly because of this section of code. Probably we should allow the user to choose if he wants to propagate the mapping to integration request too.
I raised an issue with AWS and they answered as below, " The internal server error" was raised because of “Signature mimatch” between API Gateway and Lambda. As API Gateway too uses “Authorization” header , the header gets corrupted if users too use it. AWS advised me not to use this header and use a different name.
I changed my header from “Authorization” to “AuthToken” and it worked in 1.26.1 serverless. Posting this is it can help anyone.
I believe this is just a work around and sls needs to fix this.