title: AWS Ruby SDK , check a key exists always gives 'false'
body: <p>In AWS S3, I have a bucket named <code>my-bucket</code>, I am using <a href="https://aws.amazon.com/sdk-for-ruby/" rel="nofollow">AWS Ruby SDK</a> to access my bucket.</p>
  
  <p>under <code>my-bucket</code> I have the following directory structure in S3 (I know it is not called "directory" in S3, but just to show the idea):</p>
  
  <pre><code>my-bucket/
      customers/
           products/
                - data1.txt
                - data2.txt
                ...
  </code></pre>
  
  <p>I want to check does <code>my-bucket/customers/products</code> exist with AWS Ruby SDK, I tried the following code:</p>
  
  <pre><code>s3 = Aws::S3::Resource.new
  bucket = s3.bucket("my-bucket")
  result = bucket.object("customers/products").exists?
  </code></pre>
  
  <p>But the <code>result</code> gives <code>false</code>, even though I do have that directory in S3, where am I wrong?</p>