I'm using the Amazon S3 PHP Class to upload files from my EC2 instance to S3 storage
/**
* Amazon S3 PHP class
*
* @link http://undesigned.org.za/2007/10/22/amazon-s3-php-class
* @version 0.5.0-dev
*/
The code that I had was working for over 6 months but last night it suddenly stopped working! I checked all the credentials and the code and everything else and they seem to be fine
I even checked the code on my local machine and it works fine, but on the server if fails to upload files to S3
Is it possible that S3 storage has blocked my EC2 IP address? Anyone else had this problem before?
After going through the whole S3 PHP library and trace it down I found the solution
"Your computer's clock or time zone setting is incorrect. Because S3 uses the current time to authenticate requests, if your clock is off by more than 15 minutes, or if your time zone is incorrect (thus leading to a skew of hours), your requests will fail."
It was related to the following issue: RequestTimeTooSkewed Error using PHP S3 Class