2

I am integrating Amazon s3 Elastic Transcoder using aws-sdk-php. I use http://elastictranscoding.blogspot.in/ link to accomplish my task. While implementing i face following error:

Fatal error: Uncaught Aws\ElasticTranscoder\Exception\ResourceNotFoundException: AWS Error Code: ResourceNotFoundException, Status Code: 404, AWS Request ID: 820ccf2d-6fc3-11e3-85a1-cdbd862f75bb, AWS Error Type: client, AWS Error Message: The specified pipeline was not found: account=008180918836, pipelineId=1388230727728-l0b712., User-Agent: aws-sdk-php2/2.5.0 Guzzle/3.7.1 curl/7.29.0 PHP/5.4.12 thrown in D:\projects\modelpeopledemo\amazon_upload\Aws\Common\Exception\NamespaceExceptionFactory.php on line 91

Create job code:

require 'aws-autoloader.php';
    use Aws\ElasticTranscoder\ElasticTranscoderClient;
    $aws = Aws\Common\Aws::factory('config.json');
    createjob('trailer_480p.mp4'); exit;

function createjob($fname){
    $aws = Aws\Common\Aws::factory('config.json');
    $client = ElasticTranscoderClient::factory(array(
       'key' => 'IAM user's public key',
       'secret' => 'IAM user's secret key',
       'region' => 'us-east-1'
    ) );
    // Create a new transcoding job
    $file_name = $fname;
    $file_name_explode = explode( '.', $file_name );
    $webm_transcode_request = $client->createJob( array(
       'PipelineId' => 'my pipeline id',
       'Input' => array(
           'Key' => $fname,
           'FrameRate' => 'auto',
           'Resolution' => 'auto',
           'AspectRatio' => 'auto',
           'Interlaced' => 'auto',
           'Container' => 'auto',
       ),
       'Output' => array(
           'Key' => 'trailer_480p.mp4',
            'ThumbnailPattern' => $file_name_explode[0] . '-700thumb-{resolution}-{count}',
           'Rotate' => '0',
           'PresetId' => '1351620000001-000020' 
       )
    ) );
    return $webm_transcode_request;
}

config.json

{
    "includes": ["_aws"],
    "services": {
        "default_settings": {
            "params": {
              "key": "AWS public key",
              "secret": "AWS secret key",
              "region": "us-east-1"
            }
        }
    }
}

My user policy is:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
            "elastictranscoder:*",
            "s3:*",
            "iam:*",
            "sns:*"
      ],
      "Resource": "*"
    }
  ]
}

My user group's policy is:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "Sid",
      "Effect": "Allow",
      "Action": "*",
      "Resource":"*"
    }
  ]
}

I think i am not authorized to access elastic transcoder service. Please suggest. Thank in advance.

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
Ravi Majithia
  • 276
  • 4
  • 11

1 Answers1

6

Verify your detail before you create job 'key','secret','region',

check pipeline region while you create pipeline, may be create job region is different, some time other region user not able connect via different region, double check require credential please make sure your pipeline region and create job region is must be same.

Wiram Rathod
  • 1,895
  • 1
  • 19
  • 41
  • how i can make sure the pipeline region of the job is correct, could you elaborate a bit plz – S Gaber Apr 15 '14 at 20:20
  • 1
    I believe the default is us-east-1. Make sure it corresponds to the region in which you created your pipeline in the aws console. It is in the top right corner of the console. On a sidenote, you should make sure your s3 buckets and pipeline are in the same region too to save on transfer costs. – brettwmc Sep 04 '14 at 00:10