I know this thread is closed but I've recently had this problem and wanted to share my solution.
I was encountering this problem upon deployment, but I couldn't replicate it locally:
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
InvalidArgumentException : Missing required client configuration options:
region: (string)
A "region" configuration value is required for the "s3" service
(e.g., "us-west-2"). A list of available public regions and endpoints can be
found at http://docs.aws.amazon.com/general/latest/gr/rande.html.
I tried clearing various caches but nothing seemed to work. I was banging my head against a brick wall for hours!
The source of the problem is that in my deployment script I was running composer install before I had created a .env file.
You may wonder why the .env file would ever be missing; I use Capistrano style deployments where a separate release directory is created each time I deploy. The codebase is then cloned into this directory and the dependencies are installed, and so on.
At the bottom of the composer.json file there's a call to @php artisan package:discover --ansi. This command looks at all your service providers and does some Laravel magic.
Some of my custom service providers relied on variables in the .env file. As mentioned before I was running composer install before I had created a .env file. This means the service providers couldn't operate correctly as the variables they relied on didn't exist yet.
I changed my deployment script so that the first thing that happens is the .env file being created and everything works again!
I hope this helps someone in the Laravel community. <3