upstash/ratelimit-js

Awaiting `pending` promise is required in Lambda

unstubbable opened this issue · 1 comments

I'm not sure whether this is a gap in the documentation, or actually a bug: In my single-region setup with AWS Lambda (with response streaming), I need to await pending to avoid that the lambda functions are running into task timeouts.

I tried everything else (different limiters, setting a timeout, declaring in module scope or request scope, using an ephemeralCache or not), but nothing helped, only awaiting the pending promise worked.

superseded by #91, and related to #90