I am trying to create a Bash Script that can delete all of my Amazon Transcribe jobs from a single command. I have created the following script:
#!/bin/bash
aws transcribe list-transcription-jobs --max-results 100 --query '[TranscriptionJobSummaries[*].TranscriptionJobName]' --output text
while read jobName; do
aws delete-transcription-job --transcription-job-name "$jobName"
done
However, when this runs, it lists the transcription jobs, but does not delete them. In fact, it does nothing at all after deleting the jobs! Although, it continues to process the job even through it does nothing.
Any ideas on how to fix this or where I am going wrong?