Does AWS Lambda attempt to retry when memory overflow issue is occured?

Viewed 206

I have a lambda function that consumes much memory in rare cases. I 'd like to know if the lambda function would retry when the memory overflow happens (asynchronously invoked). Tried to track it through cloudwatch log but couldn't get exact information about it. Thanks for your help!

1 Answers

For async invocations:

Lambda manages the function's asynchronous event queue and attempts to retry on errors. If the function returns an error, Lambda attempts to run it two more times [...] Function errors include errors returned by the function's code and errors returned by the function's runtime, such as timeouts.

The out of memory error would fall into function's runtime error category. Thus the async invocation should be retried.

Related