title: AWS S3DownloadTask is Unable to resolve host: No address associated with hostname
body: <p>I'm trying to download from my Amazon S3 bucket on Android, although i'm getting this error:</p>
  
  <pre><code>java.net.UnknownHostException: Unable to resolve host "cognito-identity.us-west-2.amazonaws.com": No address associated with hostname
  </code></pre>
  
  <p>on this line </p>
  
  <pre><code>Download down = manager.download(AWSClientManager.S3_BUCKET_NAME, fileToDownload, file);
  </code></pre>
  
  <p>I'm unsure why it would be using <strong>us-west-2</strong> when the default for my <strong><em>CognitoCachingCredentialsProvider</em></strong> is <strong>us-east-1</strong></p>
  
  <p>Even so, the following locatinos for my s3 storage have the exact same files: </p>
  
  <pre><code>https://console.aws.amazon.com/s3/home?region=us-east-1
  https://console.aws.amazon.com/s3/home?region=us-west-2
  </code></pre>
  
  <p>I have no idea why I am getting the error above, can somebody help please?</p>
  
  <p>Hi @Mark, 
  My CognitoCachingCredentialsProvider is set to US_EAST_1</p>
  
  <p>I am using AmazonS3Client to download S3 files.. I think this might be the issue.  I am explicitly setting the region, although it seems to completely disregard this.  </p>
  
  <p>This is my code where it errors:</p>
  
  <pre><code>private S3TaskResult downloadResources(String fileToDownload) {
  
          S3TaskResult result = new S3TaskResult();
          File file = new File(downloadDirectory, fileToDownload);
  
          try {
  
              manager.getAmazonS3Client().setRegion(com.amazonaws.regions.Region.getRegion(Regions.US_EAST_1));
              Download down = manager.download(AWSClientManager.S3_BUCKET_NAME, fileToDownload, file);
              down.addProgressListener(this);
              down.waitForCompletion();
  
          } catch (Exception e) { 
              // TODO:  FIGURE OUT WHY IT ERRORS HERE :(
              result.setErrorMessage(e.getMessage()); 
          }
  
          return result;
      }
  </code></pre>