title: PHP AWS SDK 3 Error: AWS HTTP error: cURL error 6: Could not resolve host: s3.oregon.amazonaws.com
body: <p>I'm trying to connect to an AWS version 3 SDK bucket.</p>
  
  <p>But, I receive the below error:</p>
  
  <blockquote>
    <p>PHP Fatal error:  Uncaught exception 'Aws\S3\Exception\S3Exception' with message 'Error executing "PutObject" on "<a href="https://s3.oregon.amazonaws.com/my-buekct-test/hello_world.txt" rel="noreferrer">https://s3.oregon.amazonaws.com/my-buekct-test/hello_world.txt</a>"; AWS HTTP error: cURL error 6: Could not resolve host: s3.oregon.amazonaws.com (see <a href="http://curl.haxx.se/libcurl/c/libcurl-errors.html" rel="noreferrer">http://curl.haxx.se/libcurl/c/libcurl-errors.html</a>)'</p>
  </blockquote>
  
  <p>This is my code, just simple.</p>
  
  <pre><code>&lt;?php
  header('Content-Type: text/plain; charset=utf-8');
  
  // Include the SDK using the Composer autoloader
  require 'vendor/autoload.php';
  
  $s3 = new Aws\S3\S3Client([
  'region'  =&gt; 'Oregon',
  'version' =&gt; 'latest',
  'credentials' =&gt; [
      'key'    =&gt; 'Enter the key',
      'secret' =&gt; 'Enter the Secret key'
  ]
  ]);
  
  // Send a PutObject request and get the result object.
  $key = 'hello_world.txt';
  
  $result = $s3-&gt;putObject([
  'Bucket' =&gt; 'my-buekct-test',
  'Key'    =&gt; $key,
  'Body'   =&gt; 'this is the body!'
  ]);
  
  // Print the body of the result by indexing into the result object.
  echo $result['Body'];
  </code></pre>
  
  <p>I'm using AWS centos, php 5.5.21, apache 2.4.10</p>
  
  <p>Could you help point out where did I go wrong?</p>