title: Copy files from S3 to HDFS using distcp or s3distcp
body: <p>I am trying to copy files from S3 to HDFS using the following command:</p>
  
  <pre><code>hadoop distcp s3n://bucketname/filename hdfs://namenodeip/directory
  </code></pre>
  
  <p>However this is not working, getting an error as following:</p>
  
  <pre><code>ERROR tools.DistCp: Exception encountered 
  java.lang.IllegalArgumentException: Invalid hostname in URI
  </code></pre>
  
  <p>I have tried to add the S3 keys in hadoop conf.xml, and it is also not working. Please help me  the appropriate step by step procedure to achieve the file copy from S3 to HDFS.</p>
  
  <p>Thanks in advance.</p>