AWS Step Functions: Handling errors
Вставка
- Опубліковано 1 чер 2024
- In this session, viewers learn how to use AWS Step Functions workflows to handle errors in their serverless applications. The advantages of lifting error-handling logic out of individual AWS Lambda functions and into workflows are addressed. The Amazon States Language (ASL) Fail State is introduced along with the eight default ASL errors. Retriers are discussed as a mechanism for handling downstream failures, including backoff rates and complex retries. Catchers, or fallback states, are used for error recovery. Error output is framed in the context of the JSONPath object. Examples are built that demonstrate built-in errors and custom retriers and catchers.
Need a guided tutorial for Step Functions? Try the new interactive Step Functions workshop. catalog.workshops.aws/stepfun...
For more serverless resources, visit serverlessland.com/learn/aws-... - Наука та технологія
How to catch lambda payload in step function task catch block?
Hi. I need some help. I created a step function that deploys a job in EKS. Also I added a "Next" step to auto-delete the job once the pod is completed. The issue that I´m having is that when the pod fails, the job is not cleaned-up. What can I do?
Can we apply common retry policy at one place for all task in a state machine?I don't want to define the same policy for all the task
Today the best way to do this is with the AWS CDK. In practice, it will be converted to a copy of the same retrier at each place where it's used.
Thanks for the feedback! We'll consider how to make this a better experience all around.
good explanations and demo. Could you please post the code repository link to go through and learn by doing the things. Thanks.
Glad you enjoyed it! Please see the code at rbsttr.tv/sfnrepo
I have an SNS topic that sends message to SQS and SQS triggers a lambda, Lambda dumps json to step function, my step function is not able to read the values from lambda in the choices stage, I want to read the body > message, but not sure how to read it...any suggestion ?
I had States.TaskFailed in the state machine definition and it worked fine. I didnt had to change that to errorstring. Plus the parameterization of the timeout also gave me error which works for him :|
Why do you need to have retry in your state when your code should be handling all of that?
Is there a way to FAIL the Step Function, but still send the Error & Cause as a response ?? Because, when I catch the Error, and send the response AWS marks the Step Function invocation as a SUCCESS, which is not true right??
looking for the solution to the same scenario now.. :) I believe you have found the solution when you were looking almost an year ago.. :) could you please provide the solution ?? thank you in advance :)
@@SriHarshaJayanthi Did you get the solution? same scenario here.
And the failed state?