title: Missing required client configuration options: region
body: <p>I am trying to check bucket existence on Amazon S3 using below code:</p>
  
  <pre><code>$credentials = new Aws\Common\Credentials\Credentials($creds['access_key_id'], $creds['secret_access_key']);
  $client = Aws\S3\S3Client::factory(array( 'credentials' =&gt; $credentials ) );
  if( ! $client-&gt;doesBucketExist($creds['bucket']) ) {
      throw new Exception("Bucket (" . $creds['bucket'] . ") does not exist.");
  }
  </code></pre>
  
  <p>It is working on localhost (wamp) but when I tried this on server it is not working. I am getting following error:</p>
  
  <blockquote>
    <p>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 <a href="http://docs.aws.amazon.com/general/latest/gr/rande.html" rel="noreferrer">http://docs.aws.amazon.com/general/latest/gr/rande.html</a>. 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: <a href="http://docs.aws.amazon.com/aws-sdk-php/v3/api/index.html" rel="noreferrer">http://docs.aws.amazon.com/aws-sdk-php/v3/api/index.html</a>. If you are unable to load a specific API version, then you may need to update your copy of the SDK.</p>
  </blockquote>
  
  <p>I don't know why it is not working on server but same code is working on localhost.</p>