Amazon Elastic Transcoder Http请求错误 [英] Amazon Elastic Transcoder Http Request Error

查看:59
本文介绍了Amazon Elastic Transcoder Http请求错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要将Amazon Elastic Transcoder用于mvc项目。我希望通过http请求使用它,如文档所述。在创建请求标头时,我需要创建授权参数,如我所说的那样。但是响应返回了这个错误;

我们计算的请求签名与您提供的签名不符。检查您的AWS Secret Access Key和签名方法。有关详细信息,请参阅服务文档。



请求的主机参数= elastictranscoder.us-east-1.amazonaws.com:443



URl的帖子是= https://elastictranscoder.us-east-1.amazonaws.com:443/2012-09-25 / jobs



授权参数类似于= AWS4-HMAC-SHA256 Credential = accesskey / formatteddate / us-east-1 / elastictranscoder / aws4_request,SignedHeaders = host; x-amz-date; x-amz-target,签名= xxxxx



任何人都知道这个的原因错误?

I need to use Amazon Elastic Transcoder for an mvc project. I wanted to use it via http request as described by documentation. While creating header of request I need to create Authorization parameter as described which I think I did. But the response returns this error;
The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.

Host parameter of request is = elastictranscoder.us-east-1.amazonaws.com:443

URl for post is = https://elastictranscoder.us-east-1.amazonaws.com:443/2012-09-25/jobs

Authorization parameter is something like = AWS4-HMAC-SHA256 Credential=accesskey/formatteddate/us-east-1/elastictranscoder/aws4_request,SignedHeaders=host;x-amz-date;x-amz-target,Signature=xxxxx

Anyone have an idea of the reason for this error?

推荐答案

我已经从nuget为mvc项目更新了AWSSDK,并且有一个弹性转码器的api;这是一个简单的方法:



I have updated AWSSDK from nuget for mvc project and there was an api for elastic transcoder; here is the simple way to do:

var response = etsClient.CreateJob(new CreateJobRequest()
           {
               PipelineId = "pipelineid", //pipeline.Id,
               Input = new JobInput()
               {
                   AspectRatio = "auto",
                   Container = "auto",
                   FrameRate = "auto",
                   Interlaced = "auto",
                   Resolution = "auto",
                   Key = "folder1/video.flv"
               },
               Output = new CreateJobOutput()
               {
                   ThumbnailPattern = "",
                   Rotate = "0",
                   PresetId = "1351620000001-000040",
                   Key = "output.mp4"
               }
           });


这篇关于Amazon Elastic Transcoder Http请求错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆