Lambda: how to limit the number of lambda events processed? #1370
-
|
Full context: I have a lambda with a memory leak (there's some C++ code in there that leaks). In the long term, I will fix the leak. But as a temporary workaround, I want to limit how many events my lambda processes, so that it can exit when its memory usage gets too high (before it gets Killed by AWS). Ideally, there would be a callback that the SDK calls before it gets the next lambda event from AWS, so that I can decide whether the lambda should continue or shut down. Failing that, a predefined limit on the number of events would work as well - i.e., a way to tell my lambda "process only 8 events, then exit". Does any such mechanism in the Rust SDK exist? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
The Rust SDK doesn't have much to do with Lambda executions. For that you probably want the Lambda Rust Runtime: |
Beta Was this translation helpful? Give feedback.
The Rust SDK doesn't have much to do with Lambda executions. For that you probably want the Lambda Rust Runtime: