From 207dcafe8eacf33f194bfbd7d2feb1e224910931 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrique=20Garc=C3=ADa=20Cota?= Date: Mon, 18 Feb 2019 17:20:55 +0100 Subject: [PATCH] docs(aws-lambda) Add is_proxy_integration Closes #836 Co-authored-by: RomainDeSaJardim --- app/_hub/kong-inc/aws-lambda/index.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/_hub/kong-inc/aws-lambda/index.md b/app/_hub/kong-inc/aws-lambda/index.md index 88aa13edf743..d233ff02c7d8 100644 --- a/app/_hub/kong-inc/aws-lambda/index.md +++ b/app/_hub/kong-inc/aws-lambda/index.md @@ -116,6 +116,12 @@ params: default: "`false`" description: | An optional value that defines whether the original HTTP request URI is to be sent in the `request_uri` field of the JSON-encoded request. Request URI arguments (if any) will be sent in the separate `request_uri_args` field of the JSON body. + - name: is_proxy_integration + required: false + default: "`false`" + description: | + An optional value that defines whether the response format to receive from the Lambda to [this format](https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-lambda-proxy-integrations.html#api-gateway-simple-proxy-for-lambda-output-format). Note that the parameter `isBase64Encoded` is not implemented. + extra: | **Reminder**: curl by default sends payloads with an @@ -182,6 +188,10 @@ from being executed. We are planning to remove this limitation in the future. ```python import json def lambda_handler(event, context): + """ + If is_proxy_integration is set to true : + jsonbody='''{"statusCode": 200, "body": {"response": "yes"}}''' + """ jsonbody='''{"response": "yes"}''' return json.loads(jsonbody) ```