When I test my Lambda through AWS Gateway, I can see this lines being logged:
Wed Jul 19 20:06:11 UTC 2017 : Method response body after transformations: {"errorCode":0,"headers":{},"statusCode":567,"base64Encoded":false}
As you can see I'm returning 567 as status Code. But I always see 200:
Then, this is my configuration in Integration Response:
I'm using as reg exp .*"statusCode":567.*, but it is not matching with {"errorCode":0,"headers":{},"statusCode":567,"base64Encoded":false}.
These are my http status codes in Method Responses section:
I can not make return other than 200. I tried changing the default to be 567 instead of 200. That way it returns 567. So looks like my setting makes my API to return always the default response.
Does anybody have a clue of what I'm doing wrong?