Missing required client configuration options: region

aws_url
aws config regions
aws regions
disk s3 does not have a configured driver
laravel aws_default_region
laravel filesystem s3
region name
s3 in aws

I am trying to check bucket existence on Amazon S3 using below code:

$credentials = new Aws\Common\Credentials\Credentials($creds['access_key_id'], $creds['secret_access_key']);
$client = Aws\S3\S3Client::factory(array( 'credentials' => $credentials ) );
if( ! $client->doesBucketExist($creds['bucket']) ) {
    throw new Exception("Bucket (" . $creds['bucket'] . ") does not exist.");
}

It is working on localhost (wamp) but when I tried this on server it is not working. I am getting following error:

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. version: (string) A "version" configuration value is required. Specifying a version constraint ensures that your code will not be affected by a breaking change made to the service. For example, when using Amazon S3, you can lock your API version to "2006-03-01". Your build of the SDK has the following version(s) of "s3": * "2006-03-01" You may provide "latest" to the "version" configuration value to utilize the most recent available API version that your client's API provider can find. Note: Using 'latest' in a production application is not recommended. A list of available API versions can be found on each client's API documentation page: http://docs.aws.amazon.com/aws-sdk-php/v3/api/index.html. If you are unable to load a specific API version, then you may need to update your copy of the SDK.

I don't know why it is not working on server but same code is working on localhost.


Set region explicitly when creating s3 client instead of relying on defaults.

use Aws\Credentials\Credentials;
use Aws\S3\S3Client;

$result = $stsClient->getSessionToken();

$credentials = new Credentials(
    $result['Credentials']['AccessKeyId'],
    $result['Credentials']['SecretAccessKey'],
    $result['Credentials']['SessionToken']
);

$s3Client = new S3Client([
    'version'     => '2006-03-01',
    'region'      => 'us-west-2',
    'credentials' => $credentials
]);

Missing required client configuration options: region While Trying to , File: vendor\aws\aws-sdk-php\src\ClientResolver.php Message: Missing required client configuration options: region: (string) A "region"  When instantiating a client for any service, you must specify the 'region' and 'version' options. In version 2 of the SDK, 'version' was completely optional, and 'region' was sometimes optional. In version 3, both are always required.


I had the same problem and I needed to clear my config cache to fix it.

$ artisan config:clear

AWS S3, 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  Hi, I am trying to test my file upload sent to s3. I have already installed the package league/flysystem-aws-s3-v3 ~1.0 In my .env file I have set the


Check .env file variables are matching with filesystems.php

's3' => [
            'driver' => 's3',
            'key' => env('S3_KEY'),
            'secret' => env('S3_SECRET'),
            'region' => env('S3_REGION'),
            'bucket' => env('S3_BUCKET'),
        ],

Missing required client configuration options · Issue #10 · aws/aws , Missing required client configuration options #10 you'll need to provide a few configuration parameters, including a region and a version. Missing required client configuration options: region: (string) A"region" configuration value is required for the "s3" service (e.g., "us-west-2").


1) Ensure you have S3_KEY, S3_SECRET, S3_REGION, S3_BUCKET etc configured in your .env file

2) Your environment file might have changed after the autoload/caches were generated. Run:

php artisan config:cache

“Missing required client configuration options”, ERROR: S3 Service API: Missing required client configuration options: version: (​string) A "version" configuration value is required. Specifying a version  When trying to use aws-sdk-php v3, composer complains that there is no version set. can only use aws-sdk-php v2 till this is fixed. when trying to run composer update, it returns this error: [InvalidArgumentException] Missing required cl


Missing required client configuration 'region' [#3020503], InvalidArgumentException: Missing required client configuration options: region: (​string) A "region" configuration value is required for the "iot"  Teams. Q&A for Work. Stack Overflow for Teams is a private, secure spot for you and your coworkers to find and share information.


IAM Role doesn't work for non-us-east-1 region?, Missing required client configuration options: region: (string) A "region" configuration value is required for the "s3" service (e.g., "us-west-2"). I am unable to reproduce on a fresh install of Symfony 2.7.7. This bundle declares services with names like aws.s3 and aws.ec2.Nothing should be constructed unless you've added an instance of \Aws\Symfony\AwsBundle to your application's kernel and you're injecting an aws.<service> service somewhere.


Configuration for the AWS SDK for PHP Version 3, Custom client configuration options for the AWS SDK for PHP version 3 client. This is only required when connecting to a custom endpoint (e.g., a local version See the AWS Regions and Endpoints for a list of available AWS Regions and  This page explains how to set a default region or zone for your Google Cloud Console project. When you make a request to Compute Engine, you might be required to provide a region or a zone depending on the specific requirements of your request. Any requests involving regional resources requires that you supply a region name, and any requests