8

I have created one API endpoint for lambda function, as - https://XXXXXXXXX.execute-api.us-east-1.amazonaws.com/XXXX/XXXXXXXXXXXX/ which is GET method.

While calling that endpoint from postman it is giving me

{ "message": "'XXXXXXXXX3LPDGPBF33Q:XXXXXXXXXXBLh219REWwTsNMyyyfbucW8MuM7' not a valid key=value pair (missing equal-sign) in Authorization header: 'AWS XXXXXXXXX3LPDGPBF33Q:XXXXXXXXXXBLh219REWwTsNMyyyfbucW8MuM7'." }

This is a screenshot of the Amazon Lambda Upload Site: https://i.sstatic.net/mwJ3w.png

I have Access Key Id & Secret Access Key for IAM user. I used it all but no luck. Can anyone suggest tweak about this.

3
  • 1
    There seems to be a problem with the Sigv4 signature. How are you generating the Authorization header? Commented May 10, 2016 at 19:24
  • 1
    I am able to solve this but got stuck into following problem - "message": "Credential should be scoped to correct service: 'execute-api'." This is a screenshot : i.sstatic.net/J5OvT.png Following is the format I used to create Authoraziation Header - AWS4-HMAC-SHA256 + Credential=AccessKeyId/timezoneArea/iam/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature=SecretAccessKey Commented May 11, 2016 at 5:55
  • Do anyone know how to create Authorization header for iam user with aws4_request & timezone us-east-1 Commented May 11, 2016 at 8:13

2 Answers 2

16

If you're using the latest version of Postman, you can generate the SigV4 signature automatically. The region should correspond to your API region (i.e. "us-east-1") and the service name should be "execute-api"

Postman

Sign up to request clarification or add additional context in comments.

2 Comments

This actually solves the problem ryan. You have saved my couple of days. Thank you so much.
Even after 7 years, still your answer helped me to resolve the issue
14

This is not a solution but it has helped me more than once:

Double-check that you are actually hitting an existing endpoint! Especially if you're working with AWS. AWS will return this error if you don't have the correct handler set up in your Lambda or if your API Gateway is not configured to serve this resource/verb/etc.

1 Comment

that was it for me!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.