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

45,232

Solution 1

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

Solution 2

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

Solution 3

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

Solution 4

This is a 'check-the-basics' type of answer. In my scenario, CORS and the bug mentioned above were not at issue. However, the error message given in the title is exactly what I saw and what led me to this thread.

Instead, (an an API Gateway newb) I had failed to redeploy the deployment. Once I did that, everything worked.

As a bonus, for Terraform 0.12 users, the magic you need and should use is a triggers parameter for your aws_api_gateway_deployment resource. This will automatically redeploy for you when other related APIGW resources change. See the TF documentation for details.

Solution 5

What worked for me:
1. In Api Gateway Console created OPTIONS method manually
2. In the Method Response section under created OPTIONS method added 200 OK
3. Selected Option method and enabled CORS from menu

Share:
45,232
Zigglzworth
Author by

Zigglzworth

Swimming around in my imagination...enjoying it... gonna stay here for a while

Updated on August 11, 2021

Comments

  • Zigglzworth
    Zigglzworth over 2 years

    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?