Skip to content

Instantly share code, notes, and snippets.

@korakot
Created November 17, 2022 02:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save korakot/f1fa39642ddd4e221df0765612436d35 to your computer and use it in GitHub Desktop.
Save korakot/f1fa39642ddd4e221df0765612436d35 to your computer and use it in GitHub Desktop.
Check status of Amazon transcription jobs
import boto3
tran = boto3.client('transcribe')
def check_jobs(in_name):
jobs = []
resp = tran.list_transcription_jobs(JobNameContains=in_name)
while True:
jobs += resp['TranscriptionJobSummaries']
next_token = resp.get('NextToken')
if next_token is None: break
resp = tran.list_transcription_jobs(
JobNameContains=in_name, NextToken=next_token)
# print status
for job in jobs:
name = job['TranscriptionJobName']
status = job['TranscriptionJobStatus']
print(f"{name}: {status}")
#return jobs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment