Lambda Proxy vs Lambda Non-Proxy? Which is the recommended way to integrate Lambdas with API Gateway
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
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....