satya
satya

Reputation: 152

How to delete a transcribe job in Amazon Transcribe

Do I need to delete a few transcribe jobs that I created using Amazon Transcribe service?

I'm using amazon transcribe for the first time to get a text from the video, it works fine but I didn't find anything there how to delete the particular transcribe job.

Upvotes: 4

Views: 3480

Answers (5)

Asraful
Asraful

Reputation: 1290

Simple code snippet worked for me is :

Dependency : Python 3

transcribe = boto3.client('transcribe', region_name='us-west-2')

response = transcribe.delete_transcription_job(
    TranscriptionJobName='test-transcribe_unit'
)

Official API reference

Upvotes: 0

Ravi Jayagopal
Ravi Jayagopal

Reputation: 934

Looks like they do offer a delete option now: https://docs.aws.amazon.com/transcribe/latest/dg/API_DeleteTranscriptionJob.html . Unfortunately, the code below is giving me a "Operation not found: DeleteTranscriptionJob" error, and I just can't figure out why.

$result = $transcribe->deleteTranscriptionJob([
   'TranscriptionJobName' => $transcriptionJobName
]);

Upvotes: 0

user3102930
user3102930

Reputation: 65

quiver's reply is correct. If you are on a Mac, Homebrew as of today (2018-10-22) only installs and upgrades to awscli version 1.16.30; I had to upgrade to version 1.16.38 today to access the delete-transcription-job argument. If you rely upon Homebrew, uninstall all versions of awscli managed by Homebrew with:

$ brew uninstall --force awscli

Then install with pip using:

$ pip3 install awscli

Verify using:

$ aws --version
aws-cli/1.16.38 Python/3.7.0 Darwin/17.6.0 botocore/1.12.28

Your specific version string may vary, only the "aws-cli/1.16.38" part matters of course.

Upvotes: 0

quiver
quiver

Reputation: 4470

As of 2018/10/18, you can delete Transcribe jobs.

Amazon Transcribe Supports Deletion of Completed Transcription Jobs

From AWS CLI

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

From Python SDK

>>> import boto3
>>> client = boto3.client('transcribe')
>>> client.delete_transcription_job(TranscriptionJobName='YOUR_JOB_NAME')

Of course, you can delete it from console :-)

Upvotes: 7

John Rotenstein
John Rotenstein

Reputation: 269540

From Step 3: Getting Started Using the Console - Amazon Transcribe:

Jobs are kept for 90 days and then deleted from the system.

In fact, there is no "Delete Job" command!

Upvotes: 1

Related Questions