1

I am trying to delete all of my AWS Transcribe jobs at the same time. I know I can go through and delete them one by one through the console, and I can also delete them all through the CLI through the following command:

$ aws transcribe delete-transcription-job --transcription-job-name YOUR_JOB_NAME

The issue with this is that I have to do this for each individual job! I am dealing with them on a mass scale (about 1000 jobs), and I don't want to have to go in and delete each one manually (even with a Automator set up on my Mac, this is not efficient'. Is there anyway to just delete every Transcribe job instead of putting the specific job name in?

Owen Murray
  • 135
  • 1
  • 8

1 Answers1

2

It doesn't look like it. The closest option is to write a script that lists out all the jobs with list-transcription-jobs and then loops through deleting them:

for jobName in $(aws transcribe list-transcription-jobs --query '[TranscriptionJobSummaries[*].TranscriptionJobName]' --output text);
  do aws transcribe delete-transcription-job --transcription-job-name $jobName;
done

Note there is sometimes a limit to the number of records AWS CLI will return in one call. You may have to run this multiple times or write the script to use the --next-token argument to page through the entire list of jobs.

See: delete-transcription-job — AWS CLI Command Reference

jaygooby
  • 2,436
  • 24
  • 42
Dude0001
  • 3,019
  • 2
  • 23
  • 38
  • Thanks for this. You can also increase the number of job results if you set, `aws transcribe list-transcription-jobs --max-results 100` (100 is the current maximum you can retrieve) – jaygooby May 04 '21 at 10:02