r/aws•
firecopy

Lambda Proxy vs Lambda Non-Proxy? Which is the recommended way to integrate Lambdas with API Gateway

technical question

I have concerns and questions on what approach should be favored, especially when creating production software.


From my current understanding and experience working with API Gateways, Lambda Non-Proxy integration should hands down be the best option and go-forward choice for anyone choosing to integrate a new or existing lambda to API Gateway.

It allows your Lambda to be integrated through multiple services (instead of tightly coupling integration with a single service), and keeps API Gateway specific logic within API Gateway itself (instead of bleeding that logic into the Lambda).


However, I have heard from fellow team members that AWS Lambda Integration is better (easier to use + less prone to bugs), and that even some AWS employees considered Lambda Non-Proxy integration as a "legacy" feature.


What are your thoughts and experiences?

Relevant Pages (for context):

Posted Jan 23, 2020, 7:06 AM UTC

23
asurah•

It really depends on what you are trying to do with it. Full API gateway integration will validate the schemas of incoming calls, let you remap input and output attributes, and send calls to different endpoints to different places.

Lambda proxy mode would be a good choice is you are running a web framework like Python Flask inside Lambda directly. It can replace some of the functionality API gateway would give you is you need it.

Tell me more....

2
firecopyOP•

Additional side note. May be useful for searching this topic in the future:

  • I have heard Lambda Non-Proxy Integration also referred to as AWS integration, as well as CUSTOM integration

  • I have heard Lambda Proxy Integration also referred to as AWS_PROXY integration

1
mannyv•

I remember having to do some kind of output mapping with the API gateway to get lambdas/JSON to work. With the lambda proxy that's all done for you.

1