In Lambda integration, because the Lambda function and the API are decoupled, the Lambda function handler can implement the RequestHandler<INPUT,OUTPUT> interface with INPUT and OUTPUT being any types that are transformed and sent by the API Gateway. In fact, the Lambda function that we saw in the previous section is a valid candidate as a Lambda function for Lambda integration.
For Lambda proxy integration, since INPUT and OUTPUT conform to a particular format, the handler function needs to respect that.
In the case of Lambda proxy integration, the handler function is as follows:
.class Handler : RequestHandler<Map<String, Any>, ApiGatewayResponse> { override fun handleRequest(input: ...