title: boto - What exactly is a key?
body: <p>AS the title says, what is a key in boto?</p>
  
  <ul>
  <li>What does it encapsulate (fields, data structures, methods etc.)?</li>
  <li>How does one access the file contents for files in an AWS bucket using a key/boto?</li>
  </ul>
  
  <p>I was not able to find this information on their official documentation or on any other third party website. Could anybody provide this info?</p>
  
  <p>Here are some examples of the usage of the <code>key</code> object:</p>
  
  <pre><code>def download_file(key_name, storage):
      key = bucket.get_key(key_name)
      try:
          storage.append(key.get_contents_as_string())
      except:
          print "Some error message."
  </code></pre>
  
  <p>and:</p>
  
  <pre><code>for key in keys_to_process:
      pool.spawn_n(download_file, key.key, file_contents)
  pool.waitall()
  </code></pre>