您如何连接到AWS Elastic Transcoder?

Edd*_*III 2 python transcoding boto amazon-web-services

我正在尝试对某些视频进行转码,但我连接的方式有问题.

这是我的代码:

transcode = layer1.ElasticTranscoderConnection()
transcode.DefaultRegionEndpoint = 'elastictranscoder.us-west-2.amazonaws.com'
transcode.DefaultRegionName = 'us-west-2'
transcode.create_job(pipelineId, transInput, transOutput)
Run Code Online (Sandbox Code Playgroud)

这是例外:

{u'message': u'The specified pipeline was not found: account=xxxxxx, pipelineId=xxxxxx.'}
Run Code Online (Sandbox Code Playgroud)

jam*_*sls 5

要连接到boto中的特定区域,您可以使用:

import boto.elastictranscoder
transcode = boto.elastictranscoder.connect_to_region('us-west-2')
transcode.create_job(...)
Run Code Online (Sandbox Code Playgroud)