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 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则