I recently updated my server project, and I found that a lot has changed in recent updates.
https://serverless.com/
I don’t quite understand what is the correct way to have multiple lambda functions and api gateway endpoints associated with the same project. With the old serverless, I have every lambda and endpoint as a completely separate function, this worked very well for me.
I can no longer do this anymore if I try, the second lambda function redefines my first, apparently because my "service name" is the same for both. My service name is the same because I want both other endpoints in the same API in the Gateway API. Because serverless creates an API name based on the service name.
So, I tried to add both functions to the same "Service". this worked for the most part, except now that I need to include my custom role operator for all my functions in the same role (since this one role is now associated with all my functions). Effectively gives more permissions for each individual function than it should be. Another problem is that all handler files for different functions are placed in each function deployment set.
So, in principle, I’m not sure that the right approach is to have several functions that belong to the same project, but are separate in functionality. It made sense, now not.
If anyone can give me some pointers please
thanks
aws-lambda serverless-framework
3uPh0riC
source share