Open FilipPyrek opened 1 year ago
Hi @FilipPyrek thank you for opening this feature request!
As I said on Twitter, I think this is an interesting feature that we should consider adding to this library at some point.
At the moment we are focused on implementing Parameters and Idempotency, as well as finishing Lambda Layers and investigating ESM support.
I have added this feature request to the "Ideas" bucket and added the need-customer-feedback
label. With this label we would like other readers to consider adding their use case as well as a 👍 to the issue. We'll use these datapoints during our next prioritisation.
This issue has not received a response in 2 weeks. If you still think there is a problem, please leave a comment to avoid the issue from automatically closing.
This issue has not received a response in 2 weeks. If you still think there is a problem, please leave a comment to avoid the issue from automatically closing.
Still relevant
Apologies @FilipPyrek. Yesterday I set up some new automation to handle issues and this was caught in the crossfire by mistake.
Agree that the issue should stay open. I am working on a fix to the automation.
This issue has not received a response in 2 weeks. If you still think there is a problem, please leave a comment to avoid the issue from automatically closing.
This issue has not received a response in 2 weeks. If you still think there is a problem, please leave a comment to avoid the issue from automatically closing.
Still relevant 👍
Very excited at the prospect of this feature! Have seen a few bad implementations of event routing for AppSync handlers out there and at my company, so it would be really great to have an open source one provided by AWS to standardize on so we can stop re-inventing the wheel 😄
Use case
The problem in our case is that when we use lambda in combination with GraphQL's nested resolvers feature (and mainly AppSync's implementation of nested resolvers) the lambda cold starts begin to stack-up which leads to couple of seconds of aggregated cold starts of all nested resolvers which is very unpleasant.
Solution/User Experience
GraphQL API handler in Lambda Powertools for Python has a resolver library which does the nested resolution inside a single lambda function and instead of creating the abstraction on infrastructure level, as AppSync does, it creates it on source code level. This resolution can be done thanks to informations from
$ctx.info
.This way lambda resolvers would be only for top-level Mutation/Query fields and the rest would be done inside lambda function(s).
And it will reduce any cold starts to minimum. (= cold start of single lambda function)
Alternative solutions
Acknowledgment