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

posta un anno fa294 visualizzazioni
1 Risposta
0
profile pictureAWS
ESPERTO
con risposta un anno fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande