現象
composer installすると以下のようなエラーが出る。
> 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.
at /Users/shohei.hagiwara/s4bids_ponpare/admin/vendor/aws/aws-sdk-php/src/ClientResolver.php:397
393| $missing[] = $this->getArgMessage($k, $args, true);
394| }
395| $msg = "Missing required client configuration options: \n\n";
396| $msg .= implode("\n\n", $missing);
> 397| throw new IAE($msg);
398| }
399|
400| public static function _apply_retries($value, array &$args, HandlerList $list)
401| {
Exception trace:
1 Aws\ClientResolver::throwRequired()
/Users/shohei.hagiwara/s4bids_ponpare/admin/vendor/aws/aws-sdk-php/src/ClientResolver.php:293
2 Aws\ClientResolver::resolve(Object(Aws\HandlerList))
/Users/shohei.hagiwara/s4bids_ponpare/admin/vendor/aws/aws-sdk-php/src/AwsClient.php:187
Please use the argument -v to see more details.
原因と解決方法
ただ単にS3クライアントを使っている場所でちゃんとクライアントを初期化できていないだけだった。
storage/logs/laravel.log を見るとどの場所でエラーかわかるので直す。