I am using nginx as a reverse proxy for my gateway. It is working with normal apis. However, its not working with AWS Signature. Says signature mismatch. I added proxy host , still it doesnt work. Pls help. Verified nginx logs, all headers are being passed. Issue with calculating the signature. Tried via postman and a working code using AWSSign sdk
location / {
proxy_pass_request_headers on;
proxy_pass_request_body on;
proxy_pass_header x-api-key;
proxy_pass_header Authorization;
proxy_pass_header x-amz-content-sha256;
proxy_pass_header x-amz-date;
#proxy_pass_header Host;
proxy_set_header Host $proxy_host;
proxy_pass https://<gatewayid>.execute-api.<region-name>.amazonaws.com/<stage>/;
proxy_http_version 1.1;
}
Observing the logs of nginx, I could see the signature value and sha256 value are totally different from what I see in the postman.