Step functions not able to handle lambda in unready state

0

If a lambda version is deployed or, a lambda is unused for a longer period of time (e.g. a week) then in either case the lambda will initially not be in a state whereby it can be immediately invoked.

Using a step function flow that invokes a lambda when the lambda is in this state is not gracefully handled. Even with error state handling in place to allow for retry / back-off retry the stepfunction flow will immeidately fail with an error similar to:

{
  "Cause": "ERROR: Lambda is initializing your function. It will be ready to invoke shortly. (Service: Lambda, Status Code: 409, Request ID: 0000-0000-0000-000-00000000)",
  "Error": "Lambda.AWSLambdaException"
}

Once a short period of time has been passed then the step function flow can be continued (redrive) and will execute as expected.

Expectation is that the error should be handled by the error handling in the same way as if the functioning lambda had caused an error.

Workaround is to add SQS queues in front of lambda functions that may be at risk (e.g. low use) but this seems like it should be unnecessary given error handling capabilities.

JMoore
已提問 2 個月前檢視次數 278 次
1 個回答
0

Did not try it myself, but did you try the Catch option, Did you try the Retries option?

profile pictureAWS
專家
Uri
已回答 2 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南