postmanaws-api-gateway

API Gateway with no auth setting keeps returning Missing Authentication Token to Postman


I set up a simple http put gateway on AWS, with no authentication required (keeping it simple for now) From AWS

From AWS

api gateway connects to a simple lambda function, and the connections work great when it's called from a python script on a Linux server (requests.put("https....."). However, from Postman and curl, I keep getting "Missing Authentication Token" so not sure why that error is coming back for those two other messages

curl -X POST https://xxxxxxxxxx.execute-api.us-east-1.amazonaws.com/Testing -H "Content-Type: application/json" -d '{"hello": "yo"}'

{"message":"Missing Authentication Token"}

About the only Postman/API Gateway help I could find dealt with api's requiring authentication. Anything in the api gateway, or Postman/curl calls I should look for?

from Postman

Called api from python script (requests.put("https..."), success. From Curl and Postman, "Missing Authentication Token"


Solution

  • if you api gateway is set to PUT then i think you need to send PUT in curl

    curl -X PUT https://xxxxxxxxxx.execute-api.us-east-1.amazonaws.com/Testing -H "Content-Type: application/json" -d '{"hello": "yo"}'

    you are doing POST request