Reputation:
I created my API in EC2 instance of AWS. when I'm deploying my API in to AWS Api gateway. API Gateway provided me with a link. When I used that same link in postman to access my API, I'm getting the following error, despite providing IAM credentials. The Error I'm facing is
{
"message": "No method found matching route / for http method GET."
}
Upvotes: 9
Views: 11811
Reputation: 67
Check the "Auth" section of your method request in the API gateway.
I had the same response until I set Auth to "AWS_IAM"
Upvotes: 1
Reputation: 470
I had the same problem and solved it. The problem is in the Invoke URL you're using. To fix this, please correct path: check the Deployment API link + double check what method you want to call.
You may need to add some more path variables after "/". E.g., "test", whatever, so path finishes with method you'd like to invoke.
I created test project for you, please see screenshot with example. So, in order for script to execute math operation, e.g. "add", you add "/math/add", not default invoke URL:
Good luck!
Upvotes: 4