title: mount S3 to databricks
body: <p>I'm trying understand how <code>mount</code> works. I have a S3 bucket named <code>myB</code>, and a folder in it called <code>test</code>. I did a mount using </p>
  
  <pre><code>var AwsBucketName = "myB"
  val MountName = "myB"
  </code></pre>
  
  <p>My question is that: does it create a link between S3 <code>myB</code> and databricks, and would databricks access all the files include the files under <code>test</code> folder? (or if I do a mount using var <code>AwsBucketName = "myB/test"</code>does it only link databricks to that folder<code>test</code>but not anyother files that outside of that folder?)</p>
  
  <p>If so, how do I say list files in <code>test</code> folder, read that file or or count() a csv file in scala? I did a <code>display(dbutils.fs.ls("/mnt/myB"))</code> and it only shows the test folder but not files in it. Quite new here. Many thanks for your help!</p>