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
preguntada hace 2 meses278 visualizaciones
1 Respuesta
0

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

profile pictureAWS
EXPERTO
Uri
respondido hace 2 meses

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas