S3 RequestTimeTooSkewed error

290 views
Skip to first unread message

Dimitrios

unread,
Sep 6, 2011, 4:48:47 AM9/6/11
to ASIHTTPRequest
Hello,

Many users of my app are getting a RequestTimeTooSkewed error. Amazon
says this error occurs when there is a big difference between the
server time and the client request time, longer than 15 minutes.

The files downloaded in the application are up to a few MB, so there
is practically no way for the download to take so much time, for so
many users. A possible reason for the issue, as stated in Amazon S3
docs, is that the device clock is not properly set. Indeed, I managed
to replicate the issue by setting my iPad's clock 1 hour ahead, and
then fix the issue again by setting the right time.

Unfortunately, we told our users to fix their clocks but they say that
didn't fix the issue.

Has anyone ran on this again using ASIHTTPRequest? Also, on Amazon's
forums we were asked this: "How you download files from amazon s3? Are
you using Time Limited URLs/Query string authentication or just
download file using Access Key and Secret Key?". I'm not sure I can
answer that. Is it about the way I make the calls or how
ASIHTTPRequest handles that internally?

(full thread at https://forums.aws.amazon.com/thread.jspa?messageID=277086&tstart=0)

Shai Mishali

unread,
Sep 6, 2011, 4:55:40 AM9/6/11
to asihttp...@googlegroups.com
Ill start from my strongest knowledge which is the S3 Storage.
Most people (with me among them) use the temporary links for download, since its more secure and expires after a needed interval.
I wouldn't usually see a reason to use your access and secret for that purpose.

Try seeing how your iOS app sees your time and how much it differs from the one on amazon (i guess UTC)

you could do this : 

NSDate* currentDate = [NSDate date];

NSLog("@%", [currentDate description]);

I had a similar issue with performing some actions on amazon but through a server, not an iOS app.

Hope this helps
Shai

--
You received this message because you are subscribed to the Google Groups "ASIHTTPRequest" group.
To post to this group, send email to asihttp...@googlegroups.com.
To unsubscribe from this group, send email to asihttpreques...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/asihttprequest?hl=en.


Dimitrios

unread,
Sep 6, 2011, 5:40:38 AM9/6/11
to ASIHTTPRequest
Hi Shai.

Thanks for your reply.

I'm new to S3, so could you please share any info on how to use the
temporary links? As far as I understand, I am not doing that.

Also, do I need to make a request in order to find the Amazon time?

Thanks a lot.
Dimitrios
Reply all
Reply to author
Forward
0 new messages