Durum Makinelerinde Hata Yönetimi ve Yeniden Denemeler
İş akışlarınızı dayanıklı hâle getirin. Step Functions Retry ve Catch alanlarını, üstel beklemeyi ve başarısızlıkları geri dönüş durumlarına nasıl yönlendireceğinizi öğrenin.
Durum Makinelerinde Hata Yönetimi ve Yeniden Denemeler, CoddyKit'te ücretsiz bir Serverless Backend with AWS Lambda & API Gateway dersidir. Bu, 4 dersinin 4. dersidir. Aşağıdan dersin tamamını ücretsiz okuyabilir, sonra tarayıcıda yerleşik kod editörü ve 7/24 yapay zeka koçu ile uygulamalı olarak pratik yapabilirsin. Bu, Serverless Backend with AWS Lambda & API Gateway öğrenme yolunun bir parçasıdır ve ilerlemeniz web ve CoddyKit uygulaması arasında senkronize olur. Serverless Backend with AWS Lambda & API Gateway kursu toplamda 4 dersten oluşur.
Bu dersin bazı bölümleri henüz çevrilmemiş olup İngilizce olarak gösterilmektedir.
Failures Happen in Workflows
A Step Functions workflow chains many tasks. Any task can fail — a timeout, a throttle, or a thrown error. Built-in error handling lets the state machine recover instead of crashing.
Error Names
Step Functions classifies errors with names like States.Timeout, States.TaskFailed, and States.ALL. Your custom Lambda errors appear by their error name too.
The Retry Field
A Retry array on a Task state automatically re-runs it on matching errors.
"Retry": [{
"ErrorEquals": ["States.TaskFailed"],
"MaxAttempts": 3
}]Exponential Backoff
Use IntervalSeconds and BackoffRate so each retry waits longer, easing pressure on a struggling downstream service.
"Retry": [{
"ErrorEquals": ["States.ALL"],
"IntervalSeconds": 2,
"BackoffRate": 2.0,
"MaxAttempts": 4
}]The Catch Field
When retries are exhausted, a Catch block routes the workflow to a fallback state instead of failing the whole execution.
"Catch": [{
"ErrorEquals": ["States.ALL"],
"Next": "NotifyFailure"
}]Capturing the Error
Use ResultPath in a Catch to pass the error details into the next state, so your fallback can log or react to what went wrong.
"Catch": [{
"ErrorEquals": ["States.ALL"],
"ResultPath": "$.error",
"Next": "HandleError"
}]Ordering Retry Rules
List more specific errors first. Step Functions evaluates Retry/Catch entries top to bottom, so a broad States.ALL should come last.
Timeouts as Safety Nets
Set TimeoutSeconds on a Task so a hung activity throws States.Timeout instead of running forever, which your Retry can then handle.
Fallback States
A fallback can be a Fail state that ends the execution with a clear cause, or a compensating action that undoes earlier work (the saga pattern).
Express vs Standard Error Behavior
Standard workflows keep full execution history for debugging failures; Express workflows are faster and cheaper but log to CloudWatch. Choose based on how you need to trace errors.
Designing Resilient Workflows
Combine the tools:
- Retry transient errors with backoff
- Catch terminal errors to a fallback
- Set timeouts as safety nets
- Capture error details with ResultPath
Quick Check
Test your Step Functions error-handling knowledge.
Recap
You learned resilient workflows:
- Retry re-runs tasks on matching error names
- IntervalSeconds and BackoffRate give exponential backoff
- Catch routes exhausted errors to a fallback state
- ResultPath captures the error; timeouts prevent hangs
Yapay zeka eğitmeniyle Serverless Backend with AWS Lambda & API Gateway öğren — ücretsiz
Tarayıcında gerçek kod yaz ve çalıştır, 7/24 yapay zeka eğitmeninden anında yardım al; web'de ya da uygulamada kaldığın yerden devam et.
- Kurslar
- 12
- Dersler
- 48
Sıkça Sorulan Sorular
“Durum Makinelerinde Hata Yönetimi ve Yeniden Denemeler” dersi ücretsiz mi?
Evet — “Durum Makinelerinde Hata Yönetimi ve Yeniden Denemeler” dersin tüm metni burada web'de ücretsiz olarak okunabilir. Etkileşimli olarak pratik yapmak (yerleşik kod editörü ve 7/24 yapay zeka koçu) ve Serverless Backend with AWS Lambda & API Gateway kursunun geri kalanını açmak için CoddyKit PRO'ya yükselt. Serverless Backend with AWS Lambda & API Gateway kursu toplamda 4 dersten oluşur.
“Durum Makinelerinde Hata Yönetimi ve Yeniden Denemeler” dersinde ne öğreneceğim?
İş akışlarınızı dayanıklı hâle getirin. Step Functions Retry ve Catch alanlarını, üstel beklemeyi ve başarısızlıkları geri dönüş durumlarına nasıl yönlendireceğinizi öğrenin. Serverless Backend with AWS Lambda & API Gateway ile uygulamalı kodu tarayıcıda doğrudan çalıştırarak pratik yaparsın ve 7/24 yapay zeka koçu dersi çalışırken sorularını yanıtlar.
Serverless Backend with AWS Lambda & API Gateway öğrenmeye başlamak için deneyim gerekli mi?
Önceden deneyim gerekmez. CoddyKit'te Serverless Backend with AWS Lambda & API Gateway, başlangıçtan ileri seviyeye kadar yapılandırıldığı için buradan başlayabilir veya başından başlayıp kendi hızında ilerleme yapabilirsin. Bu, 4 dersinin 4. dersidir.
“Durum Makinelerinde Hata Yönetimi ve Yeniden Denemeler” dersi ne kadar sürer?
Çoğu CoddyKit dersi yaklaşık 5–10 dakika sürer. Her biri kısa ve etkileşimli olduğu için sabit ilerleme yaparsın ve web ile uygulama arasında tam olarak bıraktığın yerden devam edebilirsin.
Bu Serverless Backend with AWS Lambda & API Gateway dersinde kod yazıp çalıştırabilir miyim?
Evet. Her Serverless Backend with AWS Lambda & API Gateway dersi yerleşik bir kod editörü içerir, bu sayede tarayıcıda gerçek kod yazıp çalıştırabilir ve anlık yapay zeka geri bildirimi alırsın — yerel kurulum gerekli değildir.
Bu kursun tüm dersleri
- AWS Step Functions'a Giriş
- Durum Makineleri Oluşturma
- Karmaşık İş Akışlarını Düzenleme
- Durum Makinelerinde Hata Yönetimi ve Yeniden Denemeler