This is another thing that came up that could be a possible improvement. If the same function path is specified for different routes, it would be nice if it could detect that and only create 1 lambda instead of many. See example, with the solution you would have to use if you wanted only 1.
f
Frank
02/19/2021, 9:51 PM
I usually recommend keeping them as diff Lambda functions. Benefit being each function gets its own CloudWatch log group. You can easily pull up all Lambda logs for the
GET /users
route. As opposed to having to sort through logs from 4 routes.
k
Karo
02/19/2021, 9:54 PM
yeah that's the approach we have used in the past in production, but we are just exploring how fat lambdas could work at the service level.. since there are people saying those solutions worked for them
f
Frank
02/19/2021, 9:57 PM
Yeah, I definitely see both sides of it. Lesser lambda = faster build time, and easier to visualize.