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달 전277회 조회
1개 답변
0

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

profile pictureAWS
전문가
Uri
답변함 2달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠