Activities

January 2015
M T W T F S S
« Dec   Feb »
 1234
567891011
12131415161718
19202122232425
262728293031  

s3cmd Error : The difference between the request time and the current time is too large

While I’m setting up the s3cmd CLI tool and try to list the remote bucket, I got the following error,

[root@streamhost yum.repos.d]# s3cmd ls
ERROR: S3 error: 403 (RequestTimeTooSkewed): The difference between the request time and the current time is too large.

Reason : The reason for this problem is that Amazon S3 allows only a small time stamp variation of up to 15 minutes between the server and its requesting client (user pc). Since Amazon is a big backup server of large number of users, security does matter a lot.

Solution : set the standard time and zone for your system

I sync the time with one of the public ubuntu time server by executing the command ntpdate ntp.ubuntu.com

[root@_streamhost yum.repos.d]# date -s "Tue Jan 11 01:03:55 CST 2015"
Sun Jan 11 01:03:55 CST 2015
[root@_streamhost yum.repos.d]# date
Sun Jan 11 01:03:58 CST 2015
[root@_streamhost yum.repos.d]# s3cmd ls
ERROR: S3 error: 403 (RequestTimeTooSkewed): The difference between the request time and the current time is too large
[root@_streamhost yum.repos.d]# ntpdate ntp.ubuntu.com
13 Jan 00:04:13 ntpdate[23736]: step time server 91.189.89.199 offset 169115.897721 sec
[root@streamhost yum.repos.d]# date
Tue Jan 13 00:04:16 CST 2015
[root@streamhost yum.repos.d]# s3cmd ls
2015-01-13 05:50  s3://mybucket_name

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>