rewrite from Amazon.com  aws-sdk-for-php requestcore.class.php