Problem deploying aws sdk into live server

Viewed 3973

Hi im trying to deploy my laravel app into live aws server but when i try to do composer install i get this erorr i have no error in local environment btw for deploying into s3 and etc and i didint find the error online

my .env file looks like this

 AWS_ACCESS_KEY_ID=*******
    AWS_SECRET_ACCESS_KEY=********
    REGION= eu-west-1
    B1_BUCKET_NAME=b1-test-s3





    539| 
     540|             // Check region is a valid host label when it is being used to
     541|             // generate an endpoint
     542|             if (!self::isValidRegion($args['region'])) {
   > 543|                 throw new InvalidRegionException('Region must be a valid RFC'
     544|                     . ' host label.');
     545|             }
     546| 
     547|             // Invoke the endpoint provider and throw if it does not resolve.
 
   Exception trace:
 
   1   Aws\ClientResolver::_apply_endpoint_provider(Object(Aws\Endpoint\Partition), Object(Aws\HandlerList))
       /home/vsts/work/1/s/vendor/aws/aws-sdk-php/src/ClientResolver.php:323
 
   2   Aws\ClientResolver::resolve(Object(Aws\HandlerList))
       /home/vsts/work/1/s/vendor/aws/aws-sdk-php/src/AwsClient.php:199
 
   Please use the argument -v to see more details.
1 Answers

for anyone has this problem when u are deploying into aws services we have config file named as aws.config in config files that published from aws/aws-sdk-php package that u need to edit the default region in there and if u don't edit it and try to edit it only in env file this error will occur

'region' => env('AWS_REGION', 'eu-west-1'), 

if the second parameter is null some how this will not work

Related