middyjs / middy

🛵 The stylish Node.js middleware engine for AWS Lambda 🛵
https://middy.js.org
MIT License
3.73k stars 376 forks source link

WebSocket Router Proposal #601

Closed willfarrell closed 2 years ago

willfarrell commented 3 years ago

Proposal for a new websocket router middleware that could allow for multiple api endpoints to be resolved by the same lambda. This can be beneficial for endpoints that are likely to hit cold starts and other strategies.

Ref:

Please 👍🏻 this issue if it would have value to you.

If you can comment with your use case below, that would be helpful.

willfarrell commented 2 years ago

Closing, using a switch on event.requestContext.routeKey is simple enough. Please comment if there is value in re-opening.