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
posta 2 mesi fa275 visualizzazioni
1 Risposta
0

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

profile pictureAWS
ESPERTO
Uri
con risposta 2 mesi fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande