The OPTIONS endpoints that were created using the cors plugin are missing the status code in the integration request mapping template, which is resulting in this error:
Execution log for request test-request
Wed Jan 27 18:20:49 UTC 2016 : Starting execution for request: test-invoke-request
Wed Jan 27 18:20:49 UTC 2016 : API Key: test-invoke-api-key
Wed Jan 27 18:20:49 UTC 2016 : Method request path: {myParam=undefined}
Wed Jan 27 18:20:49 UTC 2016 : Method request query string: {}
Wed Jan 27 18:20:49 UTC 2016 : Method request headers: {}
Wed Jan 27 18:20:49 UTC 2016 : Method request body before transformations: null
Wed Jan 27 18:20:49 UTC 2016 : Execution failed due to configuration error: statusCode should be an integer which defined in request template
Wed Jan 27 18:20:49 UTC 2016 : Method completed with status: 500
To fix this, I had to manually modify the mapping template, change it from Input passthrough to mapping template, and add the following content to the template:
The OPTIONS endpoints that were created using the cors plugin are missing the status code in the integration request mapping template, which is resulting in this error:
To fix this, I had to manually modify the mapping template, change it from Input passthrough to mapping template, and add the following content to the template: