Reputation: 5070
I am trying to call a Lambda Function through AWS API Gateway.
I've been getting this error when I tried IAM authentication, API Key Authentication and also with no authentication.
{"message":"Missing Authentication Token"}
Some people had the same problem due to non existing endpoint. However, I've taken my endpoint directly from the Lambda Function AWS Console.
I've been trying to open the URL in the Browser and also on the Postman (with and without a header authentication: x-api-key: *****************).
Both responded with above stated error.
Upvotes: 22
Views: 43535
Reputation: 41
Just wanted to mention that if you set your API gateway's authentication to be NONE
, make sure you need to Deploy API
first before the no authentication setting is in effect.
Upvotes: 4
Reputation: 5126
You have to Enable CORS from the actions for the API. This will create a new OPTIONS method. CORS is for cross domain requests
Upvotes: -2
Reputation: 7344
I'll write up a detailed FAQ here for any viewers. Ordered by most common cause.
Upvotes: 8
Reputation: 191
One more step: in Postman, you need to set the Authorization to AWS Signature, and then enter your AccessKey and SecretKey from your IAM user:
Postman screenshot
Upvotes: 19
Reputation: 3080
You need to set Api Key Required to true. See more here: http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-api-keys.html
Upvotes: -2