Handling Error Conditions Using a Step Functions State Machine