1

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?

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
tuncay
  • 51
  • 1
  • 8
  • Check leading and trailing spaces in your signature string, then in others. Strongly recommend to use Fiddler, and double check see the request headers there, to see what is really going in the wire – g.pickardou Jul 27 '15 at 12:54
  • What is weird is the expected Canonical String and String-to-Sign is same as returned by response. – tuncay Jul 27 '15 at 13:00
  • I suppose it's just a replica of what you've sent, so I would not think this has any diagnostic value – g.pickardou Jul 27 '15 at 14:20

1 Answers1

0

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

tuncay
  • 51
  • 1
  • 8