Search code examples
c#amazon-web-servicesamazon-elastic-transcoder

Amazon Elastic Transcoder Http Request Error


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?


Solution

  • 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" } });