I'm having a problem with my Presigned downloand URL
using (var S3Client = new AmazonS3Client(AppSettings.AwsAccessKey, AppSettings.AwsSecretKey, Amazon.RegionEndpoint.USEast1))
{
GetPreSignedUrlRequest request = new GetPreSignedUrlRequest
{
BucketName = AppSettings.AwsS3BucketName,
Key = Filename,
Expires = DateTime.Now.AddSeconds(ExpirationSeconds),
Verb = HttpVerb.GET
};
return S3Client.GetPreSignedURL(request);
}
usually I put 10 - 30 second on for expiration and over the sudden I start receiving a message that my URL is expired.
<Error>
<Code>AccessDenied</Code>
<Message>Request has expired</Message>
<Expires>2016-05-04T11:21:39Z</Expires>
<ServerTime>2016-05-04T11:22:12Z</ServerTime>
<RequestId>F329329970936A18</RequestId>
<HostId>womi/k5E9ffDDa6PffCcWBMYzUF2i4oRIY+QX6R/6v0IjQlipYA2OKBPQOflkoLIl4+wk6So7Ks=</HostId>
</Error>
Date difference is too big. What's wrong with that?