I have the following flow for my AWS step function, how should my Python lambda raise MyCustomError?
Just use raise Exception("MyCustomError")? Or I need to do something else? The official doc at https://docs.aws.amazon.com/step-functions/latest/dg/concepts-error-handling.html use node.js as example, and I don't see any Python examples.
{ "Comment": "A Hello World example of the Amazon States Language using an AWS Lambda function", "StartAt": "HelloWorld", "States": { "HelloWorld": { "Type": "Task", "Resource": "arn:aws:lambda:us-east-1:123456789012:function:FailFunction", "Retry": [ { "ErrorEquals": ["MyCustomError"], "IntervalSeconds": 1, "MaxAttempts": 2, "BackoffRate": 2.0 } ], "End": true } } }
MyCustomErroras a subclass ofExceptionand thenraise MyCustomError().