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
asked 2 months ago265 views
1 Answer
0

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

profile pictureAWS
EXPERT
Uri
answered 2 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions