shoehorning graphql, step functions and lamdas. aws deployment scripts
This commit is contained in:
39
ctrl/state-machine.json
Normal file
39
ctrl/state-machine.json
Normal file
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"Comment": "MPR Transcode Job - orchestrates Lambda-based media transcoding",
|
||||
"StartAt": "Transcode",
|
||||
"States": {
|
||||
"Transcode": {
|
||||
"Type": "Task",
|
||||
"Resource": "${TranscodeLambdaArn}",
|
||||
"TimeoutSeconds": 900,
|
||||
"Retry": [
|
||||
{
|
||||
"ErrorEquals": ["States.TaskFailed", "Lambda.ServiceException"],
|
||||
"IntervalSeconds": 10,
|
||||
"MaxAttempts": 2,
|
||||
"BackoffRate": 2.0
|
||||
}
|
||||
],
|
||||
"Catch": [
|
||||
{
|
||||
"ErrorEquals": ["States.ALL"],
|
||||
"Next": "HandleError",
|
||||
"ResultPath": "$.error"
|
||||
}
|
||||
],
|
||||
"Next": "Done"
|
||||
},
|
||||
"HandleError": {
|
||||
"Type": "Pass",
|
||||
"Parameters": {
|
||||
"status": "failed",
|
||||
"job_id.$": "$.job_id",
|
||||
"error.$": "$.error.Cause"
|
||||
},
|
||||
"Next": "Done"
|
||||
},
|
||||
"Done": {
|
||||
"Type": "Succeed"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user