문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top