AWS recommends that Lambda proxy integration is the way to integrate the API Gateway with Lambda.
The request that is received by the API Gateway is passed through to the Lambda function in a specific format. The Lambda function is expected to parse this payload into an appropriate type that it requires to perform the action.
The following code block shows the input passed to the Lambda function from the API Gateway in the case of a Lambda proxy integration:
{ "resource":"Resource path", "path":"Path parameter", "httpMethod":"Incoming request's method name", "headers":{ "key":"value" }, "queryStringParameters":{ "key":"value" }, "pathParameters":{ "key":"value" }, "stageVariables":{ "key":"value" }