我需要将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,Signature = XXXXX
有人知道这个错误的原因吗?
答案 0 :(得分:0)
我已经从nuget为mvc项目更新了AWSSDK,并且有一个弹性转码器的api; 这是一个简单的方法:
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"
}
});