Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS API Gateway : Execution failed due to configuration error: No match for output mapping and no default output mapping configured

In AWS API Gateway, I have a GET method that invokes a lambda function.

When I test the method in the API Gateway dashboard, the lambda function executes successfully but API Gateway is not mapping the context.success() call to a 200 result despite having default mapping set to yes.

Instead I get this error:

Execution failed due to configuration error: No match for output mapping and no default output mapping configured

This is my Integration Response setup: enter image description here

And this is my method response setup: enter image description here

Basically I would expect the API Gateway to recognize the successful lambda execution and then map it by default to a 200 response but that doesn't happen.

Does anyone know why this isn't working?

like image 727
Zigglzworth Avatar asked Dec 06 '15 16:12

Zigglzworth


People also ask

What is the default gateway response for an invalid AWS Signature error?

The gateway response for an invalid AWS signature error. If the response type is unspecified, this response defaults to the DEFAULT_4XX type. The gateway response for a missing authentication token error, including the cases when the client attempts to invoke an unsupported API method or resource.

Is AWS API gateway mapping lambda functions to context?

In AWS API Gateway, I have a GET method that invokes a lambda function. When I test the method in the API Gateway dashboard, the lambda function executes successfully but API Gateway is not mapping the context.success () call to a 200 result despite having default mapping set to yes.

Why is my API gateway not working?

If you run into permissions problem with this it is often due to a misconfigured “Trust Relationship” with the role it is assuming. You will see an error: Execution failed due to configuration error: API Gateway does not have permission to assume the provided role.

What is the default gateway response type for AWS authentication token expired?

The gateway response for an AWS authentication token expired error. If the response type is unspecified, this response defaults to the DEFAULT_4XX type. The gateway response for an integration failed error. If the response type is unspecified, this response defaults to the DEFAULT_5XX type.


3 Answers

I had the similar issue, got it resolved by adding the method response 200

like image 142
raaone7 Avatar answered Oct 09 '22 22:10

raaone7


I have same issue while uploading api using serverless framework. You can simply follow bellow steps which resolve my issue.

1- Navigate to aws api gateway
2- find your api and click on method(Post, Get, Any, etc)
3- click on method response
4- Add method with 200 response.
5- Save it & test

like image 13
Mohmadhaidar devjiyani Avatar answered Oct 09 '22 22:10

Mohmadhaidar devjiyani


There was an issue when saving the default integration response mapping which has been resolved. The bug caused requests to API methods that were saved incorrectly to return a 500 error, the CloudWatch logs should contain:

Execution failed due to configuration error: 
No match for output mapping and no default output mapping configured. 

Since the 'ENABLE CORS' saves the default integration response, this issue also appeared in your scenario.

For more information, please refer to the AWS forums entry: https://forums.aws.amazon.com/thread.jspa?threadID=221197&tstart=0

Best,

Jurgen

like image 11
Jurgen Avatar answered Oct 09 '22 22:10

Jurgen