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

gefragt vor einem Jahr294 Aufrufe
1 Antwort
0
profile pictureAWS
EXPERTE
beantwortet vor einem Jahr

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen