How is AWS lambda integration different from calling lambda directly from the gateway ?

0

I am trying to create an HTTP API using one of my existing lambda functions. There I can either keep the 'Use Lambda Proxy integration' under request integration ticked or unticked. As I understood when proxy integration is selected, all request details will be sent in the event object in the format specified in [1]. But if we opt not to use proxy integration only the request payload will be sent in the event object. Does this mean we need to change the lambda implementation if we want to move from proxy to non-proxy integration ? (ex: in one case can access payload directly in event object, but in the other I have to access payload as event.body)

Also can you please advice on when to use Lambda Proxy Integration and not ?

[1]. https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-lambda-proxy-integrations.html#api-gateway-simple-proxy-for-lambda-input-format

已提問 1 年前檢視次數 294 次
1 個回答
0
profile pictureAWS
專家
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南