title: Laravel 5.1 AWS S3 Flysytem: AWS HTTP error: cURL error 6: Couldn't resolve host name
body: <p>I'm on my local environment and are about to enable file uploading to AWS s3, using Laravel 5.1 Flysystem/Filesystem.</p>
  
  <p>All setup has been done. I have created a test form, and I'm trying to upload a file. When I push the submit button, I get this absolutely, only too lovable error:</p>
  
  <pre><code>S3Exception in WrappedHttpHandler.php line 152:
  Error executing "HeadObject" on "https://s3.Frankfurt.amazonaws.com/bucketName/resource-6";
  AWS HTTP error: cURL error 6: Couldn't resolve host name
  </code></pre>
  
  <p>Sooo... where have I gone wrong? <strong>Here is my code:</strong></p>
  
  <p><strong>FORM / VIEW</strong></p>
  
  <pre><code>{!! Form::open([
          'route'         =&gt; 'resource-store',
          'class'         =&gt; 'uploadResource',
          'files'         =&gt; true
  ]) !!}
  
  {!! Form::label('Resource title') !!}
  {!! Form::text('title', null, ['placeholder'=&gt;'Descriptive title']) !!}
  
  {!! Form::label('Your Resource') !!}
  {!! Form::file('resource', null) !!}
  
  {!! Form::submit('Create Resource') !!}
  
  {!! Form::close() !!}
  </code></pre>
  
  <p><strong>CONTROLLER STORE METHOD</strong></p>
  
  <pre><code>public function store(ResourceRequest $request, $id)
      {
          /* Store entry in DB */
          $resource = new Resource();
          $resource-&gt;title = $request-&gt;title;
          $resource-&gt;save();
  
          /* Process, Validate &amp; Store Image */
          Storage::put(
              'resource-'.$resource-&gt;id,
              $resource
          );
  
          /* Success message */
          session()-&gt;flash('message', $request-&gt;title . ' er lavet/uploadet!');
          return redirect()-&gt;route('resource.index');
      }
  </code></pre>
  
  <p><strong>DATABASE CONFIG</strong></p>
  
  <pre><code>'mysql' =&gt; [
              'driver'    =&gt; 'mysql',
              'host'      =&gt; env('DB_HOST', 'localhost'),
              'database'  =&gt; env('DB_DATABASE', 'forge'),
              'username'  =&gt; env('DB_USERNAME', 'forge'),
              'password'  =&gt; env('DB_PASSWORD', ''),
              'charset'   =&gt; 'utf8',
              'collation' =&gt; 'utf8_unicode_ci',
              'prefix'    =&gt; '',
              'strict'    =&gt; false,
              'port'      =&gt; 33060,
          ],
  </code></pre>
  
  <p><strong>CONFIG/FILESYSTEMS.PHP</strong></p>
  
  <pre><code>return [
  
      'default' =&gt; 's3',
      'cloud' =&gt; 's3',
  
      'disks' =&gt; [
  
          'local' =&gt; [
              'driver' =&gt; 'local',
              'root'   =&gt; storage_path().'/app',
          ],
  
          's3' =&gt; [
              'driver' =&gt; 's3',
              'key'    =&gt; env('AWS_KEY'),
              'secret' =&gt; env('AWS_SECRET'),
              'region' =&gt; env('AWS_REGION'),
              'bucket' =&gt; env('AWS_BUCKET'),
          ],
  
          'rackspace' =&gt; [
              'driver'    =&gt; 'rackspace',
              'username'  =&gt; 'your-username',
              'key'       =&gt; 'your-key',
              'container' =&gt; 'your-container',
              'endpoint'  =&gt; 'https://identity.api.rackspacecloud.com/v2.0/',
              'region'    =&gt; 'IAD',
          ],
      ],
  ];
  </code></pre>