2

I am working with step functions and lambdas.I have read documentation how to do retries on various exceptions, but i didn't able to find what if i have created custom exception in python lambda and if that exception is raised how to use that exception in stepfunction retry block like this:

"ErrorEquals": [
          "Lambda.ServiceException",
          "Lambda.AWSLambdaException",
          "Lambda.SdkClientException"
        ]

suppose my lambda has following custom exception:

try:
    sometask
except Exception as e:
    raise MYEXCEPTION(f"my custom exception{e}")

how to do retry in step function , something which i expect is :

"ErrorEquals": [
          "MYEXCEPTION"
        ]

If my python lambda gives this custom exception please retry in step function, for that i need to understand how to match it in ErrorEquals in retry block.

1 Answer 1

2

Your expectation is correct, the catch block will look like

"ErrorEquals": [ "MYEXCEPTION" ]

Find more information here https://docs.aws.amazon.com/step-functions/latest/dg/tutorial-handling-error-conditions.html

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.