title: rails 5 Seahorse::Client::NetworkingError (getaddrinfo: Name or service not known):
body: <p>I am using paperclip to upload images to amazon S3. Here is my gemfile</p>
  
  <pre><code>gem 'rails', '~&gt; 5.0.0', '&gt;= 5.0.0.1'
  
  gem "paperclip", "~&gt; 5.0.0"
  gem 'aws-sdk', '~&gt; 2.3' 
  </code></pre>
  
  <p>Image upload works locally but breaks in production (heroku). I followed heroku's configuration setup found here: <a href="https://devcenter.heroku.com/articles/paperclip-s3#configuration" rel="nofollow noreferrer">https://devcenter.heroku.com/articles/paperclip-s3#configuration</a>. My  config/environments/production.rb file is here:</p>
  
  <pre><code>   # Do not dump schema after migrations.
    config.active_record.dump_schema_after_migration = false
  
    config.paperclip_defaults = {
    storage: :s3,
    s3_credentials: {
      bucket: ENV.fetch('S3_BUCKET_NAME'),
      access_key_id: ENV.fetch('AWS_ACCESS_KEY_ID'),
      secret_access_key: ENV.fetch('AWS_SECRET_ACCESS_KEY'),
      s3_region: ENV.fetch('AWS_REGION'),
    }
  }
  
  end
  </code></pre>
  
  <p>I ran the following heroku CLI commands:</p>
  
  <pre><code>  $ heroku config:set S3_BUCKET_NAME=your_bucket_name  
    $ heroku config:set AWS_ACCESS_KEY_ID=your_access_key_id
    $ heroku config:set AWS_SECRET_ACCESS_KEY=your_secret_access_key
    $ heroku config:set AWS_REGION=your_aws_region
  </code></pre>
  
  <p>and set the region to Oregon.</p>
  
  <p>I've seen other solutions that suggest that the aws_region should be set to us-west-2 ( <a href="https://locomotive-v3.readme.io/discuss/56a7e06897e8b00d0096d27a" rel="nofollow noreferrer">https://locomotive-v3.readme.io/discuss/56a7e06897e8b00d0096d27a</a> ). I reset my aws configuration but I get the same 'seahorse' error. I'm new to rails and don't know where else to troubleshoot. All help and suggestions are greatly appreciated!</p>
  
  <p>here is an image of my heroku log if it helps. Seems generic but I'm not familiar enough to get more detail if it's available. <a href="https://i.stack.imgur.com/Bgym3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Bgym3.png" alt="enter image description here"></a></p>