aws-lambda-dart-runtime
aws-lambda-dart-runtime copied to clipboard
Downside, everything must be marked async/await
The whole program has to be instrumented with async/await. As everything must be waited for to properly complete before your lambda function handler returns. No events can be left on the event queue when your handler returns or they will non-deterministically fail.
AWS freezes the lambda process between lambda calls (which it identify is over when you return a response from your handler). Anything left going after that in the background will see a timejump to when the lambda is called next, and will see its in-use connections reset.
Ideally the framework would wait until the event queue is empty (remove the frameworks own events). But dart might not expose the ability to do this in its own API. So perhaps just line in the documentation to warn about this issue.
BTW framework works great for me.
Maybe a zone could be used to track that all the handlers created events are finished before returning the response to AWS