Search code examples
pythonamazon-web-servicesbototranscoding

How do you connect to AWS Elastic Transcoder?


I'm trying to transcode some videos, but something is wrong with the way I am connecting.

Here's my code:

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

Here's the exception:

{u'message': u'The specified pipeline was not found: account=xxxxxx, pipelineId=xxxxxx.'}

Solution

  • To connect to a specific region in boto, you can use:

    import boto.elastictranscoder
    transcode = boto.elastictranscoder.connect_to_region('us-west-2')
    transcode.create_job(...)