When I tried to create API Gateway-> GET
method with integration to Lambda function using AWS CloudFormation, I'm getting error:CREATE_FAILED AWS::ApiGateway::Resource [my resource] Unable to parse HTTP response content
.
Any idea ?!
When specifying the MethodResponses, it's mandatory to include the status code.
This will fail with "unable to parse":
"MethodResponses": [{
"ResponseModels": {
"application/json": { "Ref": "myModel" }
} } ],
And this will succeed:
"MethodResponses": [{
"ResponseModels": {
"application/json": { "Ref": "myModel" }
},
"StatusCode": 200
} ],
No, the documentation doesn't say this. Nor does it give an example.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With