Join GitHub today
More docs for monolithic case needed #1007
In particular, I couldn't find docs about mapping multiple endpoints to a single handler.
What communicates to the handler which endpoint has been called?
The doc section on "Monolithic" links to the a GraphQL project which has only one endpoint, making it a poor example of a typical monolithic app.
For developers coming from Express, it's a natural to think about how an Express app might be designed with a single 'server' with several URLs that are handled by it.
Does anyone have something like this running, and can you describe what your s-function.json and the handler function(s) look like until the docs are improved?
EDIT: The description of the 'Microservices' architecture in the docs has a suggestion for accomplishing this sort of pattern:
I was struggling with understanding how to do the routing, not realizing API Gateway should be set up to pass METHOD and PATH which are then routed by your handler to the appropriate function in your one Lambda. The s-function.json is also pretty simple at that point, you just add endpoints to the array already there.