title: Hive jobs are not running on s3n/impala failed to open hdfs files s3n://my_bucket/
body: <p>I added <code>fs.s3n.awsAccessKeyId</code> and <code>fs.s3n.awsSecretAccessKey</code> properties in <code>core</code>, <code>hdfs</code>, <code>hive-site.xml</code>. I am able to run <code>select * from tbl</code> which is on S3 and got the result with beeline. But, when I run <code>select count(*) from tbl</code>, it fails:</p>
  
  <pre><code>Error: java.io.IOException: java.lang.reflect.InvocationTargetException
          at org.apache.hadoop.hive.io.HiveIOExceptionHandlerChain.handleRecordReaderCreationException(HiveIOExceptionHandlerChain.java:97)
         ........
  Caused by: java.lang.reflect.InvocationTargetException
          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
          at org.apache.hadoop.hive.shims.HadoopShimsSecure$CombineFileRecordReader.initNextRecordReader(HadoopShimsSecure.java:251)
          ... 11 more
  Caused by: java.io.IOException: s3n://rakeshs3 : 400 : Bad Request
          at org.apache.hadoop.fs.s3native.Jets3tNativeFileSystemStore.processException(Jets3tNativeFileSystemStore.java:453)
          at org.apache.hadoop.fs.s3native.Jets3tNativeFileSystemStore.processException(Jets3tNativeFileSystemStore.java:427)
                   ... 16 more
  Caused by: org.jets3t.service.impl.rest.HttpException: 400 Bad Request
          at org.jets3t.service.impl.rest.httpclient.RestStorageService.performRequest(RestStorageService.java:425)
          at org.jets3t.service.impl.rest.httpclient.RestStorageService.performRequest(RestStorageService.java:279)
                ... 29 more
  </code></pre>
  
  <p>Impala Errors:</p>
  
  <pre><code>Failed to open HDFS file s3n://rakeshs3/tel.txt    Error(255): Unknown error 255
  </code></pre>