8

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

Mark Mucha
  • 1,560
  • 2
  • 12
  • 18
ken
  • 8,763
  • 11
  • 72
  • 133
  • 1
    This is the generic response for "you did something wrong". Show how you're sending your request to the API. – Dark Falcon Sep 29 '15 at 20:37
  • They give a URL link in the AWS console (it's just a parameterless GET); I just clicked on it. What additional info should I include? – ken Sep 29 '15 at 20:40
  • Well, there is your problem right there. When you click the URL you're doing a GET, but your screenshot shows the method is PUT. A PUT method won't answer GET requests. – Dark Falcon Sep 29 '15 at 20:41
  • Actually is see the picture I posted was a PUT but that was attempt two ... Same outcome with a GET – ken Sep 29 '15 at 20:41
  • I've updated the question to include both GET and PUT responses (which are the same). – ken Sep 29 '15 at 20:51
  • Missing authentication token error is given when calling an invalid URL. From the information you have given, I would guess the correct URL is whatever.execute-api.eu-west-1.amazonaws.com/prod/HelloColdWorld2 – Mike76 Oct 01 '15 at 15:54

4 Answers4

4

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.

Volkan Paksoy
  • 6,727
  • 5
  • 29
  • 40
  • Thanks @volkan, sounds like your situation was a bit different from mine but sadly I left this question out there and forgot to update my answer (which of course I've now forgotten). I think mine was down to needing proxy through the SNS ARN topic in the right fashion so your answer might be more broadly applicable. :) – ken Feb 18 '16 at 16:12
  • Here's where I ended up ... http://stackoverflow.com/questions/34213464/aws-api-gateway-communicating-to-sns?noredirect=1#comment58441715_34213464 – ken Feb 18 '16 at 16:13
1

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 }

David Webster
  • 2,208
  • 1
  • 16
  • 27
0

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

Kevin
  • 1,195
  • 12
  • 14
0

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