How to fix Amazon S3-RequestTimeTooSkewed

AllCloud Blog:
Cloud Insights and Innovation

If you are uploading data to Amazon S3, you may at some point come across an error of RequestTimeTooSkewed type,  stating that : The difference between the request time and the current time is too large 

Here’s how to quickly understand and solve it .

S3 uses NTP to maintain accurate system clocks , and your client machine’s clock is out of sync with the Amazon time .

So you need to install NTP , or if already installed and running, just update the server pools to the Amazon ones.

– To install NTP , simply choose one of the bellow, depending on your distribution:

apt-get install ntp 
yum install ntp

– Configure NTP to use amazon servers , like so :

vim /etc/ntp.conf

And in it , comment out the default servers and add these:

server iburst
server iburst
server iburst
server iburst

*The iburst option is recommended, and sends a burst of packets only if it cannot obtain a connection with the first attempt. The burst option always does this, even on the first attempt, and should never be used without explicit permission and may result in blacklisting.

Restart NTP :

service ntpd restart

–  To check that you are now in sync,  you can compare your server’s time with, like so :

Get your GMT time:

date -u

Then compare it to the date header received from the bellow :

Type these commands, followed by 2 newlines :

telnet 80
GET / HTTP/1.0

The output should look similar to this :

telnet 80
Connected to
Escape character is '^]'.
GET / HTTP/1.0

HTTP/1.1 307 Temporary Redirect
x-amz-id-2: 3PtvRibd87aJd0K1oPQRwikPsAJ9RhtUGZXrXxEpK4yy4j/YRcdPd3k1l/zOokCt
x-amz-request-id: FDDE5F89A704CB98
Date: Tue, 13 May 2014 08:52:52 GMT
Content-Length: 0
Connection: keep-alive
Server: AmazonS3

You can also issue


to check if you are in sync.

This should get you rid of the RequestTimeTooSkewed error .

Simona Miroiu

Read more posts by Simona Miroiu