Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More docs for monolithic case needed #1007

Closed
markstos opened this issue Apr 14, 2016 · 2 comments
Closed

More docs for monolithic case needed #1007

markstos opened this issue Apr 14, 2016 · 2 comments
Milestone

Comments

@markstos
Copy link

@markstos markstos commented Apr 14, 2016

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.

@flomotlik flomotlik added area/docs and removed docs labels May 12, 2016
@flomotlik flomotlik added this to the 1.0 milestone May 12, 2016
@pmuens pmuens removed backlog labels Aug 1, 2016
@dperjar
Copy link

@dperjar dperjar commented Aug 2, 2016

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:

For example, a REST API could have a users resource containing one 'all' function that handles all actions for users. Assign endpoints for create, read, update, delete to the all function. API Gateway can pass the METHOD and PATH into your function via the event object, so you can determine inside your function how to handle/route incoming request.

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.

@flomotlik
Copy link
Contributor

@flomotlik flomotlik commented Aug 5, 2016

We're going to do more example on this in the future. Closing here for now as we have concrete plans for this already in place

@flomotlik flomotlik closed this Aug 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.