I attempted to install aws/aws-sdk-php yesterday on one of my Laravel 4 projects using Composer, I cannot remember exactly the chain of events but it did not in
aws/aws-sdk-php
Easy, type this commands:
rm -rf vendor/
rm -rf composer.lock
php composer install --prefer-dist
Should work for low memory machines or others memory problems