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
I ran into this too but I use brew.
composer --version
brew info composer
brew upgrade composer
...
==> Upgrading 1 outdated package:
composer 1.9.0 -> 1.9.2
==> Upgrading composer
...
which still did not fix my composer require drupal/environment_indicator
Using the php memory limit mentioned by others fixed this finally.
php -d memory_limit=-1 `which composer` require drupal/environment_indicator