Lambda proxy integration

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"   }

Get Hands-On Serverless Applications with Kotlin now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.