ken
ken

Reputation: 9013

AWS API Gateway won't open up

I created a "hello world" lambda function and then deployed it to an end-point using AWS's API Gateway:

config settings

All very much basic settings but I was sure to change the security to "open" and while i was told that it could take up for 15 minutes for the domain to resolve I found that even after 30 I was getting the following response from the "open" end-point:

 {"message":"Missing Authentication Token"}

Am I missing something obvious? Shouldn't this have been available with what I did?


Note, it was pointed out that this image is of a PUT not a GET. I tried both and both came back errors. Just to check I've run GET and PUT through Postman and get a similar but not identical response:

PUT

and then GET ...

GET

When I test the lambda function in the console it runs successfully but running it in the API Gateway it gives me a different articulation of the same error:

Tue Sep 29 20:57:43 UTC 2015 : Execution failed due to configuration error: Invalid permissions on Lambda function

and yet I used the default permissions that the console suggested. The lambda function itself is very basic and can be found here: code

Upvotes: 8

Views: 5127

Answers (4)

David Webster
David Webster

Reputation: 2333

I had this same issue with a deployed API that was being hit frequently around midday the requests would stop working and fail with { Missing Authentication Token }

My issue was not the URL or a stage that was not deployed but I do know AWS throws that error for both of those reasons.

However I found a command to invalidate the cache of apigateway because in my case I was using a custom domain attached to cloudfront.

aws apigateway flush-stage-cache --rest-api-id 97y41psdkg --stage-name dev

After running this I stopped getting the { Missing Authentication Token }

Upvotes: 1

Please use your resource name end of your api URL.

https://***********.execute-api.us-east-1.amazonaws.com/Stag/number

Here number is my resource name

Upvotes: 0

Kevin
Kevin

Reputation: 1195

You need to use "AWS Signature" under the Authorization tab in Postman. See this AWS guide on what to enter into those fields:

http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-use-postman-to-call-api.html

Upvotes: 0

Volkan Paksoy
Volkan Paksoy

Reputation: 6977

I was having the exact some problem today. Whatever I did didn't work but finally figured out. turns out in order for the changes to take effect, you need to Deploy API.

So first go to Resources and click on Deploy API button. It will ask for a deployment stage. Once deployed I could call my API without any issues.

I know it's been a while since you posted the question, but thought it might come in handy for other people as well.

Upvotes: 4

Related Questions