title: SignatureDoesNotMatch in S3 using play-s3 and Play Framework 2.5 - Scala
body: <p>I am having the following issue, when Trying to retrieve a File from S3 using <a href="https://github.com/Kaliber/play-s3" rel="nofollow">play-s3</a> but it looks like in the GET </p>
  
  <blockquote>
    <p>version used "net.kaliber" %% "play-s3" % "8.0.0"</p>
  </blockquote>
  
  <pre><code>fly.play.s3.S3Exception: Problem accessing S3. Status 403, code SignatureDoesNotMatch, message 'SignatureDoesNotMatch'
  
  Problem accessing S3. Status 403, code SignatureDoesNotMatch, message 'SignatureDoesNotMatch'
  Original xml:
  Some(&lt;Error&gt;&lt;Code&gt;SignatureDoesNotMatch&lt;/Code&gt;&lt;Message&gt;The request signature we calculated does not match the signature you provided. Check your key and signing method.&lt;/Message&gt;&lt;AWSAccessKeyId&gt;AKIAI3DOSLNJC4YGPZSQ&lt;/AWSAccessKeyId&gt;&lt;StringToSign&gt;AWS4-HMAC-SHA256
  20160627T212133Z
  20160627/eu-west-1/s3/aws4_request
  f8795580f6de5742706adab4ca6c89f8bfa9565b1e0c837a54297a2dcd8114df&lt;/StringToSign&gt;&lt;SignatureProvided&gt;0dd99e84f2424d8d46dcff6119a9e34fa049489106149214caefe0fc1bd2d213&lt;/SignatureProvided&gt;&lt;StringToSignBytes&gt;41 57 53 34 2d 48 4d 41 43 2d 53 48 41 32 35 36 0a 32 30 31 36 30 36 32 37 54 32 31 32 31 33 33 5a 0a 32 30 31 36 30 36 32 37 2f 65 75 2d 77 65 73 74 2d 31 2f 73 33 2f 61 77 73 34 5f 72 65 71 75 65 73 74 0a 66 38 37 39 35 35 38 30 66 36 64 65 35 37 34 32 37 30 36 61 64 61 62 34 63 61 36 63 38 39 66 38 62 66 61 39 35 36 35 62 31 65 30 63 38 33 37 61 35 34 32 39 37 61 32 64 63 64 38 31 31 34 64 66&lt;/StringToSignBytes&gt;&lt;CanonicalRequest&gt;GET
  /test%C2%ADtest%C2%ADtest%C2%ADfilipe/1234.jpg
  </code></pre>
  
  <p>My code looks like this:</p>
  
  <pre><code>  val result = S3(bucketName)
      .get("1234.jpg")
  
    val file = Await.result(result, 10 seconds)
    log.info(""+file)
  </code></pre>
  
  <p>The application.conf has the following properties, which aI know for a fac are valid ones:</p>
  
  <pre><code>aws.accessKeyId="AAaAAAAAAA"  //not the real one
  aws.secretKey="AAAAAAAA"      //not the real one of course
  aws.bucket="filipe-bucket"
  s3.region="eu-west-1"
  </code></pre>
  
  <p>(the region is correct!)</p>
  
  <p>I spent quite a bit of time trying to figure out what the issue might be - does anybody has clue about it?</p>
  
  <p>Is this an issue perhaps with the date sent in the signature, they say it should match the date of the request:</p>
  
  <pre><code>host:s3-eu-west-1.amazonaws.com
  x-amz-content-sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
  x-amz-date:20160627T214556Z
  </code></pre>
  
  <p>Note that I made the request at 11:45pm(I am CEST), and the time here is:</p>
  
  <pre><code> x-amz-date:20160627T214556Z
  </code></pre>
  
  <p><a href="http://docs.aws.amazon.com/general/latest/gr/sigv4-date-handling.html" rel="nofollow">http://docs.aws.amazon.com/general/latest/gr/sigv4-date-handling.html</a></p>