Refactored module to run on AWS SDK for PHP 2.