Amazon s3 Elastic Transcoder错误:找不到指定的管道

时间:2013-12-28 13:45:05

标签: php amazon-web-services amazon-s3 amazon-elastic-transcoder

我正在使用aws-sdk-php集成Amazon s3 Elastic Transcoder。我使用http://elastictranscoding.blogspot.in/链接来完成我的任务。在实施我面临以下错误时:

致命错误:未捕获的Aws \ ElasticTranscoder \ Exception \ ResourceNotFoundException:AWS错误代码:ResourceNotFoundException,状态代码:404,AWS请求ID:820ccf2d-6fc3-11e3-85a1-cdbd862f75bb,AWS错误类型:客户端,AWS错误消息:找不到指定的管道:account = 008180918836,pipelineId = 1388230727728-l0b712。,用户代理:aws -sdk-php2 / 2.5.0 Guzzle / 3.7.1 curl / 7.29.0 PHP / 5.4.12抛出D: 91号线上的\ projects \ modelpeopledemo \ amazon_upload \ Aws \ Common \ Exception \ NamespaceExceptionFactory.php

创建职位代码:

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"
            }
        }
    }
}

我的用户政策是:

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

我的用户组的政策是:

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

我认为我无权访问弹性转码器服务。请建议。提前谢谢。

1 个答案:

答案 0 :(得分:6)

在创建作业'key','secret','region',

之前验证您的详细信息

在创建管道时检查管道区域, 可能是创造工作区域不同, 有时其他地区用户无法通过不同地区连接, 仔细检查需要凭据 请确保您的管道区域和创建作业区域必须相同。