When trying to create a job in the AWS Transcoder pipeline, I'm getting
Aws::ElasticTranscoder::Errors::BadRequest
. I'm pretty sure I have the params right, but I'm still getting this ambiguous error. Has anyone encountered that?
My call looks like this
client = Aws::ElasticTranscoder::Client.new(
access_key_id: Rails.application.credentials.aws_s3_access_key_id,
secret_access_key: Rails.application.credentials.aws_s3_secret_access_key,
region: Rails.application.credentials.aws_s3_region,
endpoint: 'https://s3.us-west-2.amazonaws.com'
)
params = {:pipeline_id=>"xxxxxxxxxxxxx-xxxxxx",
:inputs=>
[{:key=>"test/folder1/0.mp4", :frame_rate=>"auto", :resolution=>"auto", :aspect_ratio=>"auto", :interlaced=>"auto", :container=>"auto"},
{:key=>"test/folder1/1.mp4", :frame_rate=>"auto", :resolution=>"auto", :aspect_ratio=>"auto", :interlaced=>"auto", :container=>"auto"}],
:output=>{:key=>"final.mp4", :preset_id=>"1351620000001-000010"}}
client.create_job(params)
Pipeline is active and it's in the same region. So is s3 bucket.
Turns out it was the
endpoint
param in the client that made this mess... Just remove it. Hope this will hint someone and spare a few hours of debugging.