Skip to content

Commit

Permalink
Add fail condition to AV download step function
Browse files Browse the repository at this point in the history
Start lambda API on port 3003
  • Loading branch information
mbklein committed Oct 10, 2023
1 parent 0f2f30e commit 4435378
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/start-with-step
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

sam local start-lambda --host 0.0.0.0 --env-vars env.json --log-file lambda.log & lambda_pid=$!
sam local start-lambda --host 0.0.0.0 --port 3003 --env-vars env.json --log-file lambda.log & lambda_pid=$!
sam local start-api --host 0.0.0.0 --log-file dc-api.log & api_pid=$!
docker run --rm -p 8083:8083 -e LAMBDA_ENDPOINT=http://172.17.0.1:3001/ amazon/aws-stepfunctions-local
docker run --rm -p 8083:8083 -e LAMBDA_ENDPOINT=http://172.17.0.1:3003/ amazon/aws-stepfunctions-local
kill $api_pid $lambda_pid
8 changes: 8 additions & 0 deletions state_machines/av_download.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
"Variable": "$.transcodeOutput.status",
"StringEquals": "COMPLETE",
"Next": "getDownloadLink"
},
{
"Variable": "$.transcodeOutput.status",
"StringEquals": "ERROR",
"Next": "failWorkflow"
}
],
"Default": "Wait 10 seconds"
Expand Down Expand Up @@ -55,6 +60,9 @@
}
},
"End": true
},
"failWorkflow": {
"Type": "Fail"
}
}
}

0 comments on commit 4435378

Please sign in to comment.